From: Arnaldo Carvalho de Melo Date: Mon, 8 Aug 2016 17:59:21 +0000 (-0300) Subject: perf bench mem: Use USEC_PER_SEC X-Git-Tag: v4.14-rc1~2411^2~14^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2b91be731a6c1aff9333c1ce3fece7a311f1e0d;p=platform%2Fkernel%2Flinux-rpi.git perf bench mem: Use USEC_PER_SEC Following kernel practices, using linux/time64.h Cc: Adrian Hunter Cc: David Ahern Cc: Jiri Olsa Cc: Namhyung Kim Cc: Steven Rostedt Cc: Wang Nan Link: http://lkml.kernel.org/n/tip-xdtmguafva17wp023sxojiib@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo --- diff --git a/tools/perf/bench/mem-functions.c b/tools/perf/bench/mem-functions.c index 2b54d0f..c684910 100644 --- a/tools/perf/bench/mem-functions.c +++ b/tools/perf/bench/mem-functions.c @@ -21,6 +21,7 @@ #include #include #include +#include #define K 1024 @@ -89,7 +90,7 @@ static u64 get_cycles(void) static double timeval2double(struct timeval *ts) { - return (double)ts->tv_sec + (double)ts->tv_usec / (double)1000000; + return (double)ts->tv_sec + (double)ts->tv_usec / (double)USEC_PER_SEC; } #define print_bps(x) do { \