mirror of https://github.com/mpv-player/mpv
Sleep(0) != usleep(0), bugreport by Paul-Kenji Cahier
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11481 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
0d327f00f2
commit
01c75bcd70
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue