summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
Diffstat (limited to 'osdep')
-rw-r--r--osdep/timer.c2
-rw-r--r--osdep/timer.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/osdep/timer.c b/osdep/timer.c
index 123a78c850..7c57e1ef1c 100644
--- a/osdep/timer.c
+++ b/osdep/timer.c
@@ -38,7 +38,7 @@ static void do_timer_init(void)
// Arbitrary additional offset to avoid confusing relative/absolute times.
// Also,we rule that the timer never returns 0 (so default-initialized
// time values will be always in the past).
- raw_time_offset -= 10000000;
+ raw_time_offset -= MP_START_TIME;
}
void mp_time_init(void)
diff --git a/osdep/timer.h b/osdep/timer.h
index bc0e5252c9..2bef4130df 100644
--- a/osdep/timer.h
+++ b/osdep/timer.h
@@ -38,6 +38,8 @@ uint64_t mp_raw_time_us(void);
// Sleep in microseconds.
void mp_sleep_us(int64_t us);
+#define MP_START_TIME 10000000
+
// Return the amount of time that has passed since the last call, in
// microseconds. *t is used to calculate the time that has passed by storing
// the current time in it. If *t is 0, the call will return 0. (So that the