summaryrefslogtreecommitdiffstats
path: root/osdep/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'osdep/timer.c')
-rw-r--r--osdep/timer.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/osdep/timer.c b/osdep/timer.c
index 053d12dd7c..32f0172b0b 100644
--- a/osdep/timer.c
+++ b/osdep/timer.c
@@ -48,7 +48,10 @@ void mp_time_init(void)
int64_t mp_time_us(void)
{
- return mp_raw_time_us() - raw_time_offset;
+ int64_t r = mp_raw_time_us() - raw_time_offset;
+ if (r < MP_START_TIME)
+ r = MP_START_TIME;
+ return r;
}
double mp_time_sec(void)