summaryrefslogtreecommitdiffstats
path: root/tools/perf/bench
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2016-08-08 14:59:21 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-08-23 15:37:33 -0300
commitf2b91be731a6c1aff9333c1ce3fece7a311f1e0d (patch)
tree4ec458ac79da1d0ffe41bdf08630d8b0ddc5a167 /tools/perf/bench
parent310ebb93676d2106b4c2e68bbf1b2811461bb9f3 (diff)
downloadblackbird-obmc-linux-f2b91be731a6c1aff9333c1ce3fece7a311f1e0d.tar.gz
blackbird-obmc-linux-f2b91be731a6c1aff9333c1ce3fece7a311f1e0d.zip
perf bench mem: Use USEC_PER_SEC
Following kernel practices, using linux/time64.h Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-xdtmguafva17wp023sxojiib@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/bench')
-rw-r--r--tools/perf/bench/mem-functions.c3
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 @@
#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 { \
OpenPOWER on IntegriCloud