Merge tag 'xtensa-20161005' of git://github.com/jcmvbkbc/linux-xtensa
[cascardo/linux.git] / tools / perf / bench / futex-wake.c
index 87d8f4f..e246b1b 100644 (file)
@@ -16,6 +16,7 @@
 #include <subcmd/parse-options.h>
 #include <linux/compiler.h>
 #include <linux/kernel.h>
+#include <linux/time64.h>
 #include <errno.h>
 #include "bench.h"
 #include "futex.h"
@@ -81,7 +82,7 @@ static void print_summary(void)
        printf("Wokeup %d of %d threads in %.4f ms (+-%.2f%%)\n",
               wakeup_avg,
               nthreads,
-              waketime_avg/1e3,
+              waketime_avg / USEC_PER_MSEC,
               rel_stddev_stats(waketime_stddev, waketime_avg));
 }
 
@@ -182,7 +183,7 @@ int bench_futex_wake(int argc, const char **argv,
 
                if (!silent) {
                        printf("[Run %d]: Wokeup %d of %d threads in %.4f ms\n",
-                              j + 1, nwoken, nthreads, runtime.tv_usec/1e3);
+                              j + 1, nwoken, nthreads, runtime.tv_usec / (double)USEC_PER_MSEC);
                }
 
                for (i = 0; i < nthreads; i++) {