* [tip:perf/core] perf bench mem: Use USEC_PER_SEC
@ 2016-08-24 9:16 tip-bot for Arnaldo Carvalho de Melo
0 siblings, 0 replies; only message in thread
From: tip-bot for Arnaldo Carvalho de Melo @ 2016-08-24 9:16 UTC (permalink / raw)
To: linux-tip-commits
Cc: adrian.hunter, jolsa, namhyung, wangnan0, tglx, dsahern, rostedt,
linux-kernel, acme, hpa, mingo
Commit-ID: f2b91be731a6c1aff9333c1ce3fece7a311f1e0d
Gitweb: http://git.kernel.org/tip/f2b91be731a6c1aff9333c1ce3fece7a311f1e0d
Author: Arnaldo Carvalho de Melo <acme@redhat.com>
AuthorDate: Mon, 8 Aug 2016 14:59:21 -0300
Committer: Arnaldo Carvalho de Melo <acme@redhat.com>
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 <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>
---
tools/perf/bench/mem-functions.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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 <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 { \
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-08-24 9:16 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-24 9:16 [tip:perf/core] perf bench mem: Use USEC_PER_SEC tip-bot for Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox