summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorVadim Bendebury <vbendeb@chromium.org>2017-02-02 17:46:31 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-02-03 20:01:45 -0800
commit7c2c423882ae1d87db7528de1974357267fa4282 (patch)
treeb14a0c44174967815c0d573510b7fc04b55962e2 /common
parentc19a3cad62defafd385f4ad6ffd1d506e8aac6cc (diff)
downloadchrome-ec-7c2c423882ae1d87db7528de1974357267fa4282.tar.gz
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 <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/436804 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common')
-rw-r--r--common/timer.c4
1 files changed, 2 insertions, 2 deletions
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++) {