Changed timeslice implementation to use something more portable (thanks to
authorRyan C. Gordon <icculus@icculus.org>
Tue, 05 Mar 2002 01:35:54 +0000
changeset 115 c0671785777b
parent 114 6196e86d1adb
child 116 d3dd84433dd6
Changed timeslice implementation to use something more portable (thanks to Patrick Stein and his Darwin work for this one).
platform/unix.c
--- a/platform/unix.c	Wed Nov 14 23:47:24 2001 +0000
+++ b/platform/unix.c	Tue Mar 05 01:35:54 2002 +0000
@@ -309,10 +309,7 @@
 /* Much like my college days, try to sleep for 10 milliseconds at a time... */
 void __PHYSFS_platformTimeslice(void)
 {
-    struct timespec napTime;
-    napTime.tv_sec = 0;
-    napTime.tv_nsec = 10 * 1000 * 1000;  /* specified in nanoseconds. */
-    nanosleep(&napTime, NULL);           /* don't care if it fails. */
+    usleep( 10 * 1000 );           /* don't care if it fails. */
 } /* __PHYSFS_platformTimeslice */