From 81439c5f35e604174408a2aaf4e4dec11b81ac39 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 17 May 2013 19:54:37 +0200 Subject: timer: refactor, add 64 bit timer function Make OS specific timer code export a mp_raw_time_us() function, and add generic implementations of GetTimer()/GetTimerMS() using this function. New mpv code is supposed to call mp_time_us() in situations where precision is absolutely needed, or mp_time_s() otherwise. Make it so that mp_time_us() will return a value near program start. We don't set it to 0 though to avoid confusion with relative vs. absolute time. Instead, pick an arbitrary offset. Move the test program in timer-darwin.c to timer.c, and modify it to work with the generic timer functions. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 6f3d254c62..182094993e 100644 --- a/Makefile +++ b/Makefile @@ -215,8 +215,9 @@ SOURCES = talloc.c \ demux/extension.c \ demux/mf.c \ demux/video.c \ - osdep/numcores.c \ osdep/io.c \ + osdep/numcores.c \ + osdep/timer.c \ stream/stream.c \ stream/stream_avdevice.c \ stream/stream_file.c \ -- cgit v1.2.3