diff options
| author | Nick Barnes | 2002-07-04 17:23:35 +0100 |
|---|---|---|
| committer | Nick Barnes | 2002-07-04 17:23:35 +0100 |
| commit | be3dfe6079920f5603dc11a3850199659c738267 (patch) | |
| tree | a9840e52523a908b44f895cef9064a464e82235d /mps/code | |
| parent | 37ba75f488c9db18f48d689b873b5e5b47baf8a1 (diff) | |
| download | emacs-be3dfe6079920f5603dc11a3850199659c738267.tar.gz emacs-be3dfe6079920f5603dc11a3850199659c738267.zip | |
Time_since will almost always be zero.
Copied from Perforce
Change: 30795
ServerID: perforce.ravenbrook.com
Diffstat (limited to 'mps/code')
| -rw-r--r-- | mps/code/steptest.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/mps/code/steptest.c b/mps/code/steptest.c index 671986c82d5..a2709b063f2 100644 --- a/mps/code/steptest.c +++ b/mps/code/steptest.c | |||
| @@ -188,13 +188,11 @@ static void set_clock_timing(void) | |||
| 188 | static double time_since(double t) | 188 | static double time_since(double t) |
| 189 | { | 189 | { |
| 190 | t = my_clock() - t; | 190 | t = my_clock() - t; |
| 191 | if (t < clock_time) { | 191 | total_clock_time += clock_time + clock_time; |
| 192 | total_clock_time += clock_time + t; | 192 | if (t < clock_time) |
| 193 | return 0.0; | 193 | return 0.0; |
| 194 | } else { | 194 | else |
| 195 | total_clock_time += clock_time + clock_time; | ||
| 196 | return (t - clock_time); | 195 | return (t - clock_time); |
| 197 | } | ||
| 198 | } | 196 | } |
| 199 | 197 | ||
| 200 | /* print a number of microseconds in a useful format. */ | 198 | /* print a number of microseconds in a useful format. */ |
| @@ -468,7 +466,8 @@ static void *test(void *arg, size_t s) | |||
| 468 | total_clock_time, | 466 | total_clock_time, |
| 469 | " spent reading the clock;\n"); | 467 | " spent reading the clock;\n"); |
| 470 | printf(" %lu clock reads; ", (unsigned long)clock_reads); | 468 | printf(" %lu clock reads; ", (unsigned long)clock_reads); |
| 471 | print_time("", total_clock_time / clock_reads, " per read)\n"); | 469 | print_time("", total_clock_time / clock_reads, " per read;"); |
| 470 | print_time(" recently measured as ", clock_time, ").\n"); | ||
| 472 | mps_ap_destroy(ap); | 471 | mps_ap_destroy(ap); |
| 473 | mps_root_destroy(exactRoot); | 472 | mps_root_destroy(exactRoot); |
| 474 | mps_root_destroy(ambigRoot); | 473 | mps_root_destroy(ambigRoot); |