diff options
Diffstat (limited to 'src/util/test_scheduler_delay.c')
-rw-r--r-- | src/util/test_scheduler_delay.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/util/test_scheduler_delay.c b/src/util/test_scheduler_delay.c index 6c25531f2..1ec86c647 100644 --- a/src/util/test_scheduler_delay.c +++ b/src/util/test_scheduler_delay.c | |||
@@ -55,10 +55,10 @@ test_task (void *cls) | |||
55 | target = | 55 | target = |
56 | GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_multiply | 56 | GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_multiply |
57 | (GNUNET_TIME_UNIT_MICROSECONDS, i)); | 57 | (GNUNET_TIME_UNIT_MICROSECONDS, i)); |
58 | FPRINTF (stderr, "%s", "."); | 58 | fprintf (stderr, "%s", "."); |
59 | if (i > MAXV) | 59 | if (i > MAXV) |
60 | { | 60 | { |
61 | FPRINTF (stderr, "%s", "\n"); | 61 | fprintf (stderr, "%s", "\n"); |
62 | return; | 62 | return; |
63 | } | 63 | } |
64 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply | 64 | GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply |
@@ -77,17 +77,17 @@ main (int argc, char *argv[]) | |||
77 | NULL); | 77 | NULL); |
78 | target = GNUNET_TIME_absolute_get (); | 78 | target = GNUNET_TIME_absolute_get (); |
79 | GNUNET_SCHEDULER_run (&test_task, NULL); | 79 | GNUNET_SCHEDULER_run (&test_task, NULL); |
80 | FPRINTF (stdout, | 80 | fprintf (stdout, |
81 | "Sleep precision: %llu microseconds (average delta). ", | 81 | "Sleep precision: %llu microseconds (average delta). ", |
82 | cumDelta / (MAXV / INCR)); | 82 | cumDelta / (MAXV / INCR)); |
83 | if (cumDelta <= 500 * MAXV / INCR) | 83 | if (cumDelta <= 500 * MAXV / INCR) |
84 | FPRINTF (stdout, "%s", "Timer precision is excellent.\n"); | 84 | fprintf (stdout, "%s", "Timer precision is excellent.\n"); |
85 | else if (cumDelta <= 5000 * MAXV / INCR) /* 5 ms average deviation */ | 85 | else if (cumDelta <= 5000 * MAXV / INCR) /* 5 ms average deviation */ |
86 | FPRINTF (stdout, "%s", "Timer precision is good.\n"); | 86 | fprintf (stdout, "%s", "Timer precision is good.\n"); |
87 | else if (cumDelta > 25000 * MAXV / INCR) | 87 | else if (cumDelta > 25000 * MAXV / INCR) |
88 | FPRINTF (stdout, "%s", "Timer precision is awful.\n"); | 88 | fprintf (stdout, "%s", "Timer precision is awful.\n"); |
89 | else | 89 | else |
90 | FPRINTF (stdout, "%s", "Timer precision is acceptable.\n"); | 90 | fprintf (stdout, "%s", "Timer precision is acceptable.\n"); |
91 | return 0; | 91 | return 0; |
92 | } | 92 | } |
93 | 93 | ||