gettime: even rounding, don't always round up
authorJens Axboe <axboe@kernel.dk>
Tue, 1 Jan 2013 12:38:18 +0000 (13:38 +0100)
committerJens Axboe <axboe@kernel.dk>
Tue, 1 Jan 2013 12:38:18 +0000 (13:38 +0100)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
gettime.c

index 05625d1..3011d74 100644 (file)
--- 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);