summaryrefslogtreecommitdiffstats
path: root/osdep/timer-win2.c
diff options
context:
space:
mode:
Diffstat (limited to 'osdep/timer-win2.c')
-rw-r--r--osdep/timer-win2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/osdep/timer-win2.c b/osdep/timer-win2.c
index dd7a42f0d1..db4c39d7ef 100644
--- a/osdep/timer-win2.c
+++ b/osdep/timer-win2.c
@@ -52,17 +52,17 @@ void mp_end_hires_timers(int res_ms)
#endif
}
-void mp_sleep_us(int64_t us)
+void mp_sleep_ns(int64_t ns)
{
- if (us < 0)
+ if (ns < 0)
return;
// Sleep(0) won't sleep for one clocktick as the unix usleep
// instead it will only make the thread ready
// it may take some time until it actually starts to run again
- if (us < 1000)
- us = 1000;
- int hrt = mp_start_hires_timers(us / 1000);
- Sleep(us / 1000);
+ if (ns < 1e6)
+ ns = 1e6;
+ int hrt = mp_start_hires_timers(ns / 1e6);
+ Sleep(ns / 1e6);
mp_end_hires_timers(hrt);
}