summaryrefslogtreecommitdiffstats
path: root/osdep/timer.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-02-28 23:18:52 +0100
committerwm4 <wm4@nowhere>2014-02-28 23:18:52 +0100
commit1f8a400ad746eb3b03b243c53104f39f18488a94 (patch)
treee62c95d37579f5d2a99c8056dc78408d65926ad8 /osdep/timer.h
parent97409ec4e652a2d56c3d77764cf9858b19b5cea9 (diff)
downloadmpv-1f8a400ad746eb3b03b243c53104f39f18488a94.tar.bz2
mpv-1f8a400ad746eb3b03b243c53104f39f18488a94.tar.xz
timer: add utility function to get relative time
Diffstat (limited to 'osdep/timer.h')
-rw-r--r--osdep/timer.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/osdep/timer.h b/osdep/timer.h
index 8d5b553f2e..efb596765a 100644
--- a/osdep/timer.h
+++ b/osdep/timer.h
@@ -38,4 +38,10 @@ uint64_t mp_raw_time_us(void);
// Sleep in microseconds.
void mp_sleep_us(int64_t us);
+// 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
+// first call will return 0, instead of the absolute current time.)
+int64_t mp_time_relative_us(int64_t *t);
+
#endif /* MPLAYER_TIMER_H */