diff options
Diffstat (limited to 'tools/perf/bench/mem-functions.c')
-rw-r--r-- | tools/perf/bench/mem-functions.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/perf/bench/mem-functions.c b/tools/perf/bench/mem-functions.c index 2b54d0f2672a..c684910e5a48 100644 --- a/tools/perf/bench/mem-functions.c +++ b/tools/perf/bench/mem-functions.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <string.h> | 21 | #include <string.h> |
22 | #include <sys/time.h> | 22 | #include <sys/time.h> |
23 | #include <errno.h> | 23 | #include <errno.h> |
24 | #include <linux/time64.h> | ||
24 | 25 | ||
25 | #define K 1024 | 26 | #define K 1024 |
26 | 27 | ||
@@ -89,7 +90,7 @@ static u64 get_cycles(void) | |||
89 | 90 | ||
90 | static double timeval2double(struct timeval *ts) | 91 | static double timeval2double(struct timeval *ts) |
91 | { | 92 | { |
92 | return (double)ts->tv_sec + (double)ts->tv_usec / (double)1000000; | 93 | return (double)ts->tv_sec + (double)ts->tv_usec / (double)USEC_PER_SEC; |
93 | } | 94 | } |
94 | 95 | ||
95 | #define print_bps(x) do { \ | 96 | #define print_bps(x) do { \ |