X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Fsandbox%2Fsandbox.c;h=80eaa6334cb56cccbeadaee9e0a3bf68c9a07c40;hb=25a63f5b900715b5cc8b69fcf9b6f23b90daa658;hp=2227f1c1214a97ae078fe18dac950dfe1a835b90;hpb=1733259d25015c28c47990ec11af99b3f62f811c;p=oweals%2Fu-boot.git diff --git a/board/sandbox/sandbox.c b/board/sandbox/sandbox.c index 2227f1c121..80eaa6334c 100644 --- a/board/sandbox/sandbox.c +++ b/board/sandbox/sandbox.c @@ -7,6 +7,7 @@ #include #include #include +#include #include /* @@ -25,9 +26,17 @@ void flush_cache(unsigned long start, unsigned long size) { } +/* system timer offset in ms */ +static unsigned long sandbox_timer_offset; + +void sandbox_timer_add_offset(unsigned long offset) +{ + sandbox_timer_offset += offset; +} + unsigned long timer_read_counter(void) { - return os_get_nsec() / 1000; + return os_get_nsec() / 1000 + sandbox_timer_offset * 1000; } int dram_init(void)