forked from luck/tmp_suning_uos_patched
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>
This commit is contained in:
parent
310ebb9367
commit
f2b91be731
|
@ -21,6 +21,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <linux/time64.h>
|
||||||
|
|
||||||
#define K 1024
|
#define K 1024
|
||||||
|
|
||||||
|
@ -89,7 +90,7 @@ static u64 get_cycles(void)
|
||||||
|
|
||||||
static double timeval2double(struct timeval *ts)
|
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 { \
|
#define print_bps(x) do { \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user