From 7c2c423882ae1d87db7528de1974357267fa4282 Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Thu, 2 Feb 2017 17:46:31 -0800 Subject: common: add decimal real number seconds value to timeirnfo output The timerinfo command shows the number of microseconds since boot, expressed as a hexadecimal value. Some of us are not as good in converting hexadecimal seconds value into decimal number of seconds and microseconds. This patch adds the decimal value to the output. BRANCH=none BUG=none TEST=verified that timerinfo output makes sense: > time Time: 0x000000000b66d280 us, 191.287936 s ... > time Time: 0x000000000caec680 us, 212.780672 s Change-Id: I3bd4ba16f3cfb74ba8fcec4899fbff0ab259007c Signed-off-by: Vadim Bendebury Reviewed-on: https://chromium-review.googlesource.com/436804 Reviewed-by: Randall Spangler --- common/timer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'common') diff --git a/common/timer.c b/common/timer.c index 0440aaecab..1e4b1911e2 100644 --- a/common/timer.c +++ b/common/timer.c @@ -205,10 +205,10 @@ void timer_print_info(void) __hw_clock_event_get(); int tskid; - ccprintf("Time: 0x%016lx us\n" + ccprintf("Time: 0x%016lx us, %11.6ld s\n" "Deadline: 0x%016lx -> %11.6ld s from now\n" "Active timers:\n", - t, deadline, deadline - t); + t, t, deadline, deadline - t); cflush(); for (tskid = 0; tskid < TASK_ID_COUNT; tskid++) { -- cgit v1.2.1