From fda59e57ff0b1ad29786d35abb5ba189011fb479 Mon Sep 17 00:00:00 2001 From: Alexandru M Stan Date: Thu, 10 May 2018 20:33:32 -0700 Subject: host: add __hw_clock_source_read Sometimes common code needs __hw_clock_source_read, add it. The implementation is similar of what common/timer.c does to create a ts for get_time(), but in reverse. TEST=Unit tests pass again for the next CL BRANCH=master BUG=None Change-Id: I10564abedabe88e4789723bc97bac170ae020c69 Signed-off-by: Alexandru M Stan Reviewed-on: https://chromium-review.googlesource.com/1055191 Reviewed-by: Vincent Palatin --- core/host/timer.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/host/timer.c b/core/host/timer.c index 124f17c14f..1c1fe01457 100644 --- a/core/host/timer.c +++ b/core/host/timer.c @@ -67,6 +67,11 @@ timestamp_t get_time(void) return ret; } +uint32_t __hw_clock_source_read(void) +{ + return get_time().le.lo; +} + void force_time(timestamp_t ts) { timestamp_t now = _get_time(); -- cgit v1.2.1