summaryrefslogtreecommitdiffstats
path: root/osdep/timer-win2.c
diff options
context:
space:
mode:
authorPedro Pombeiro <pedropombeiro@gmail.com>2017-06-27 13:50:58 +0200
committerwm4 <wm4@nowhere>2017-06-29 10:36:16 +0200
commit4637b029cdd168d4196f5ab69fa5f91556ee5d11 (patch)
tree88bf0e222d4743ffb067daedef4985887f4fca37 /osdep/timer-win2.c
parentf22d12ac5115a22a251e479c9c27e5f55337bb28 (diff)
downloadmpv-4637b029cdd168d4196f5ab69fa5f91556ee5d11.tar.bz2
mpv-4637b029cdd168d4196f5ab69fa5f91556ee5d11.tar.xz
Universal Windows Plaform (UWP) support
libmpv only. Some things are still missing. Heavily reworked. Signed-off-by: wm4 <wm4@nowhere>
Diffstat (limited to 'osdep/timer-win2.c')
-rw-r--r--osdep/timer-win2.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/osdep/timer-win2.c b/osdep/timer-win2.c
index 6527adc0cd..63c423560f 100644
--- a/osdep/timer-win2.c
+++ b/osdep/timer-win2.c
@@ -21,6 +21,8 @@
#include <stdlib.h>
#include "timer.h"
+#include "config.h"
+
static LARGE_INTEGER perf_freq;
void mp_sleep_us(int64_t us)
@@ -50,5 +52,7 @@ uint64_t mp_raw_time_us(void)
void mp_raw_time_init(void)
{
QueryPerformanceFrequency(&perf_freq);
+#if !HAVE_UWP
timeBeginPeriod(1); // request 1ms timer resolution
+#endif
}