gettime: calibration rounding error
[fio.git] / gettime.c
index 549c35e9c0dc34826a69108e202f169ddffead05..a60b35f65f2b45df5c129a326ffc2c909afa2bdf 100644 (file)
--- 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