From: Jens Axboe Date: Tue, 1 Jan 2013 12:38:18 +0000 (+0100) Subject: gettime: even rounding, don't always round up X-Git-Tag: fio-2.0.13~11 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=b0ff22d7b23118b6c7dc56f2256ce6dde634422a;p=fio.git gettime: even rounding, don't always round up Signed-off-by: Jens Axboe --- diff --git a/gettime.c b/gettime.c index 05625d1b..3011d744 100644 --- a/gettime.c +++ b/gettime.c @@ -273,7 +273,7 @@ static void calibrate_cpu_clock(void) dprint(FD_TIME, "cycles[%d]=%lu\n", i, cycles[i] / 10); avg /= samples; - avg = (avg + 9) / 10; + avg = (avg + 5) / 10; dprint(FD_TIME, "avg: %lu\n", avg); dprint(FD_TIME, "mean=%f, S=%f\n", mean, S);