perf bench mem: Use USEC_PER_SEC
tip-bot for Arnaldo Carvalho de Melo
merge botCommit-ID: f2b91be731a6c1aff9333c1ce3fece7a311f1e0d Gitweb: http://git.kernel.org/tip/f2b91be731a6c1aff9333c1ce3fece7a311f1e0d Author: Arnaldo Carvalho de Melo <[email protected]> AuthorDate: Mon, 8 Aug 2016 14:59:21 -0300 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Tue, 23 Aug 2016 15:37:33 -0300
perf bench mem: Use USEC_PER_SEC
Following kernel practices, using linux/time64.h
Cc Adrian Hunter <[email protected]>
Cc David Ahern <[email protected]>
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Steven Rostedt <[email protected]>
Cc Wang Nan <[email protected]>
Signed-off-by Arnaldo Carvalho de Melo <[email protected]>
--- tools/perf/bench/mem-functions.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/bench/mem-functions.c +2 -1
@@ -21,6 +21,7 @@#include <string.h> #include <sys/time.h> #include <errno.h> +#include <linux/time64.h> #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 { \