summaryrefslogtreecommitdiffstats
path: root/osdep
diff options
context:
space:
mode:
Diffstat (limited to 'osdep')
-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 eb8bb3d3f4..7f31126790 100644
--- a/osdep/timer-win2.c
+++ b/osdep/timer-win2.c
@@ -15,6 +15,10 @@ unsigned int GetTimerMS(){
}
int usec_sleep(int usec_delay){
+ // 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(usec_delay<1000)usec_delay=1000;
Sleep( usec_delay/1000);
return 0;
}