mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-12 19:04:59 +00:00
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 <amstan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1055191 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
6c2cbf567e
commit
fda59e57ff
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user