[Mplayer-cvslog] CVS: main/linux timer-lx.c,1.2,1.3

Arpi of Ize arpi at mplayer.dev.hu
Fri Oct 19 04:16:23 CEST 2001


Update of /cvsroot/mplayer/main/linux
In directory mplayer:/var/tmp.root/cvs-serv8759

Modified Files:
	timer-lx.c 
Log Message:
sleep stuff moved to linux/timer

Index: timer-lx.c
===================================================================
RCS file: /cvsroot/mplayer/main/linux/timer-lx.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- timer-lx.c	13 Mar 2001 00:13:18 -0000	1.2
+++ timer-lx.c	19 Oct 2001 02:16:21 -0000	1.3
@@ -3,6 +3,19 @@
 #include <unistd.h>
 #include <sys/time.h>
 
+int usec_sleep(int usec_delay)
+{
+#if	1
+    struct timespec ts;
+    ts.tv_sec  =  usec_delay / 1000000;
+    ts.tv_nsec = (usec_delay % 1000000) * 1000;
+    return nanosleep(&ts, NULL);
+#else
+    return usleep(usec_delay);
+#endif
+}
+
+
 // Returns current time in microseconds
 unsigned int GetTimer(){
   struct timeval tv;




More information about the MPlayer-cvslog mailing list