perf bench sched-messaging: Use USEC_PER_MSEC

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-xhyoyxejvorrgmwjx9k3j8k2@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent f2b91be7
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <poll.h> #include <poll.h>
#include <limits.h> #include <limits.h>
#include <err.h> #include <err.h>
#include <linux/time64.h>
#define DATASIZE 100 #define DATASIZE 100
...@@ -312,11 +313,11 @@ int bench_sched_messaging(int argc, const char **argv, ...@@ -312,11 +313,11 @@ int bench_sched_messaging(int argc, const char **argv,
thread_mode ? "threads" : "processes"); thread_mode ? "threads" : "processes");
printf(" %14s: %lu.%03lu [sec]\n", "Total time", printf(" %14s: %lu.%03lu [sec]\n", "Total time",
diff.tv_sec, diff.tv_sec,
(unsigned long) (diff.tv_usec/1000)); (unsigned long) (diff.tv_usec / USEC_PER_MSEC));
break; break;
case BENCH_FORMAT_SIMPLE: case BENCH_FORMAT_SIMPLE:
printf("%lu.%03lu\n", diff.tv_sec, printf("%lu.%03lu\n", diff.tv_sec,
(unsigned long) (diff.tv_usec/1000)); (unsigned long) (diff.tv_usec / USEC_PER_MSEC));
break; break;
default: default:
/* reaching here is something disaster */ /* reaching here is something disaster */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment