Changed timeslice implementation to use something more portable (thanks to
Patrick Stein and his Darwin work for this one).
This commit is contained in:
parent
dd001ed5c5
commit
734b665b8d
|
@ -309,10 +309,7 @@ char *__PHYSFS_platformCvtToDependent(const char *prepend,
|
||||||
/* Much like my college days, try to sleep for 10 milliseconds at a time... */
|
/* Much like my college days, try to sleep for 10 milliseconds at a time... */
|
||||||
void __PHYSFS_platformTimeslice(void)
|
void __PHYSFS_platformTimeslice(void)
|
||||||
{
|
{
|
||||||
struct timespec napTime;
|
usleep( 10 * 1000 ); /* don't care if it fails. */
|
||||||
napTime.tv_sec = 0;
|
|
||||||
napTime.tv_nsec = 10 * 1000 * 1000; /* specified in nanoseconds. */
|
|
||||||
nanosleep(&napTime, NULL); /* don't care if it fails. */
|
|
||||||
} /* __PHYSFS_platformTimeslice */
|
} /* __PHYSFS_platformTimeslice */
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue