gettime: fix cycles_per_msec overflow when using 32 bit longs
[fio.git] / gettime.c
index 79455284a30d715b819a779bf3e7943c602eb549..1cbef84b0d765f224309214067fa92f1048c7fed 100644 (file)
--- a/gettime.c
+++ b/gettime.c
@@ -15,7 +15,7 @@
 
 #if defined(ARCH_HAVE_CPU_CLOCK)
 #ifndef ARCH_CPU_CLOCK_CYCLES_PER_USEC
-static unsigned long cycles_per_msec;
+static unsigned long long cycles_per_msec;
 static unsigned long long cycles_start;
 static unsigned long long clock_mult;
 static unsigned long long max_cycles_mask;