Fossil

Changes On Branch th1-runtime-cmd
Login

Changes On Branch th1-runtime-cmd

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Changes In Branch th1-runtime-cmd Excluding Merge-Ins

This is equivalent to a diff from 3a4f9ba652 to 904a35d93b

2013-07-17
12:02
Merge the updated side-by-side diff logic into trunk. ... (check-in: d70ea7ef9c user: drh tags: trunk)
09:23
A th1 runtime command which returns the current value of fossil_timer_stop(g.json.timerId). Part of an old ML thread discussion. Probably not needed but maybe interesting. ... (Closed-Leaf check-in: 904a35d93b user: stephan tags: th1-runtime-cmd)
2013-07-16
04:29
Create new branch named "ssh-transport-changes" ... (check-in: ddc9601bbc user: amb tags: ssh-transport-changes)
2013-07-15
22:23
Started work on adding by-calendar-week info to /stats_report. Incomplete but it's bed time. ... (check-in: cced11153b user: stephan tags: stats-report-weekly)
2013-07-14
22:25
Merge with trunk. ... (check-in: 3c777c4b6a user: isaac.jurado tags: git-better-import)
14:56
Rebase. Use -4 as INTEGRATE tag, not -3 ... (check-in: 967ef5f7c5 user: jan.nijtmans tags: merge-integrate)
08:46
added missing word "to" ... (check-in: 3a4f9ba652 user: stephan tags: trunk)
2013-07-12
11:31
Any vmerge.id < -2 should be handled as a MERGED_WITH by default, not as BACKOUT (even though trunk fossil cannot produce that yet). ... (check-in: 88e60e8ff3 user: jan.nijtmans tags: trunk)

Changes to src/th_main.c.

596
597
598
599
600
601
602





















603
604
605
606
607
608
609
  char zUTime[50];
  getCpuTimes(0, &x);
  sqlite3_snprintf(sizeof(zUTime), zUTime, "%llu", x);
  Th_SetResult(interp, zUTime, -1);
  return TH_OK;
}























/*
** TH1 command:     randhex  N
**
** Return N*2 random hexadecimal digits with N<50.  If N is omitted, 
** use a value of 10.
*/







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
  char zUTime[50];
  getCpuTimes(0, &x);
  sqlite3_snprintf(sizeof(zUTime), zUTime, "%llu", x);
  Th_SetResult(interp, zUTime, -1);
  return TH_OK;
}

/*
** TH1 command:     runtime
**
** Return the number of microseconds of CPU time consumed by the current
** process in both user and kernel space.
*/
static int runtimeCmd(
  Th_Interp *interp,
  void *p, 
  int argc, 
  const char **argv, 
  int *argl
){
  char zUTime[50];
  sqlite3_uint64 x = fossil_timer_fetch(g.mainTimerId);
  sqlite3_snprintf(sizeof(zUTime), zUTime, "%llu", x);
  Th_SetResult(interp, zUTime, -1);
  return TH_OK;
}



/*
** TH1 command:     randhex  N
**
** Return N*2 random hexadecimal digits with N<50.  If N is omitted, 
** use a value of 10.
*/
830
831
832
833
834
835
836

837
838
839
840
841
842
843
    {"htmlize",       htmlizeCmd,           0},
    {"linecount",     linecntCmd,           0},
    {"puts",          putsCmd,              (void*)&aFlags[1]},
    {"query",         queryCmd,             0},
    {"randhex",       randhexCmd,           0},
    {"regexp",        regexpCmd,            0},
    {"repository",    repositoryCmd,        0},

    {"setting",       settingCmd,           0},
    {"tclReady",      tclReadyCmd,          0},
    {"stime",         stimeCmd,             0},
    {"utime",         utimeCmd,             0},
    {"wiki",          wikiCmd,              (void*)&aFlags[0]},
    {0, 0, 0}
  };







>







851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
    {"htmlize",       htmlizeCmd,           0},
    {"linecount",     linecntCmd,           0},
    {"puts",          putsCmd,              (void*)&aFlags[1]},
    {"query",         queryCmd,             0},
    {"randhex",       randhexCmd,           0},
    {"regexp",        regexpCmd,            0},
    {"repository",    repositoryCmd,        0},
    {"runtime",       runtimeCmd,           0},
    {"setting",       settingCmd,           0},
    {"tclReady",      tclReadyCmd,          0},
    {"stime",         stimeCmd,             0},
    {"utime",         utimeCmd,             0},
    {"wiki",          wikiCmd,              (void*)&aFlags[0]},
    {0, 0, 0}
  };