diff options
Diffstat (limited to 'osdep/timer.c')
-rw-r--r-- | osdep/timer.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/osdep/timer.c b/osdep/timer.c index d0a8a92..907ba50 100644 --- a/osdep/timer.c +++ b/osdep/timer.c @@ -46,7 +46,12 @@ void mp_time_init(void) int64_t mp_time_ns(void) { - return mp_raw_time_ns() - raw_time_offset; + return mp_time_ns_from_raw_time(mp_raw_time_ns()); +} + +int64_t mp_time_ns_from_raw_time(uint64_t raw_time) +{ + return raw_time - raw_time_offset; } double mp_time_sec(void) |