else
cumDelta += (target.abs_value - now.abs_value);
target =
- GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_multiply
- (GNUNET_TIME_UNIT_MILLISECONDS, i));
+ GNUNET_TIME_relative_to_absolute (GNUNET_TIME_relative_multiply
+ (GNUNET_TIME_UNIT_MILLISECONDS, i));
fprintf (stderr, ".");
if (i > MAXV)
- {
- fprintf (stderr, "\n");
- return;
- }
+ {
+ fprintf (stderr, "\n");
+ return;
+ }
GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_relative_multiply
- (GNUNET_TIME_UNIT_MILLISECONDS, i),
- &test_task, NULL);
+ (GNUNET_TIME_UNIT_MILLISECONDS, i), &test_task,
+ NULL);
i += INCR;
}
target = GNUNET_TIME_absolute_get ();
GNUNET_SCHEDULER_run (&test_task, NULL);
FPRINTF (stdout, "Sleep precision: %llu ms. ",
- cumDelta / 1000 / (MAXV / INCR));
+ cumDelta / 1000 / (MAXV / INCR));
if (cumDelta <= 10 * MAXV / INCR)
fprintf (stdout, "Timer precision is excellent.\n");
- else if (cumDelta <= 50 * MAXV / INCR) /* 50 ms average deviation */
+ else if (cumDelta <= 50 * MAXV / INCR) /* 50 ms average deviation */
fprintf (stdout, "Timer precision is good.\n");
else if (cumDelta > 250 * MAXV / INCR)
fprintf (stdout, "Timer precision is awful.\n");