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:
faust3 2003-11-16 15:11:52 +00:00
parent 0d327f00f2
commit 01c75bcd70
1 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,10 @@ unsigned int GetTimerMS(){
} }
int usec_sleep(int usec_delay){ 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); Sleep( usec_delay/1000);
return 0; return 0;
} }