Skip to contentSkip to conversation

perf record: Use USEC_PER_MSEC

tip:perf/core tip-bot for Arnaldo Carvalho de Melo 1 participant 1 message Aug 24, 2016 perf events

lore
Share & tools
lore
#0 lore raw
Commit-ID:  0693e680d32e5c7415666ccfcff57ad4cd976294
Gitweb:     http://git.kernel.org/tip/0693e680d32e5c7415666ccfcff57ad4cd976294
Author:     Arnaldo Carvalho de Melo <[email protected]>
AuthorDate: Mon, 8 Aug 2016 15:05:46 -0300
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Tue, 23 Aug 2016 15:37:33 -0300

perf record: Use USEC_PER_MSEC

Instead of a naked 1000.

---
 tools/perf/builtin-record.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tools/perf/builtin-record.c +2 -2
index 6355902..a3792e8 100644
@@ -42,7 +42,7 @@
 #include <sched.h>
 #include <sys/mman.h>
 #include <asm/bug.h>
-
+#include <linux/time64.h>
 
 struct record {
 	struct perf_tool	tool;
@@ -954,7 +954,7 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
 	}
 
 	if (opts->initial_delay) {
-		usleep(opts->initial_delay * 1000);
+		usleep(opts->initial_delay * USEC_PER_MSEC);
 		perf_evlist__enable(rec->evlist);
 	}