[Mplayer-cvslog] CVS: main/osdep timer-win2.c,1.1,1.2

Sascha Sommer CVS faust3 at mplayerhq.hu
Sun Nov 16 16:12:38 CET 2003


Update of /cvsroot/mplayer/main/osdep
In directory mail:/var/tmp.root/cvs-serv11386/osdep

Modified Files:
	timer-win2.c 
Log Message:
Sleep(0) != usleep(0), bugreport by Paul-Kenji Cahier

Index: timer-win2.c
===================================================================
RCS file: /cvsroot/mplayer/main/osdep/timer-win2.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- timer-win2.c	25 Apr 2003 10:00:18 -0000	1.1
+++ timer-win2.c	16 Nov 2003 15:11:52 -0000	1.2
@@ -15,6 +15,10 @@
 }
 
 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;
 }



More information about the MPlayer-cvslog mailing list