From: Jens Axboe Date: Mon, 10 Dec 2012 07:29:03 +0000 (+0100) Subject: gettime: calibration rounding error X-Git-Tag: fio-2.0.12~16 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=c011000deaf5131861a2bd1fb2ac72582418e891;hp=486332e567826eb284bfd9064440867f31fccd7f gettime: calibration rounding error Signed-off-by: Jens Axboe --- diff --git a/gettime.c b/gettime.c index 549c35e9..a60b35f6 100644 --- a/gettime.c +++ b/gettime.c @@ -207,7 +207,7 @@ static unsigned long get_cycles_per_usec(void) } } while (1); - return (c_e - c_s) >> 7; + return (c_e - c_s + 127) >> 7; } #define NR_TIME_ITERS 50