platform/unix.c
changeset 115 c0671785777b
parent 100 d2f04ab4b412
child 117 55ae10d7f2a9
equal deleted inserted replaced
114:6196e86d1adb 115:c0671785777b
   307 
   307 
   308 
   308 
   309 /* Much like my college days, try to sleep for 10 milliseconds at a time... */
   309 /* Much like my college days, try to sleep for 10 milliseconds at a time... */
   310 void __PHYSFS_platformTimeslice(void)
   310 void __PHYSFS_platformTimeslice(void)
   311 {
   311 {
   312     struct timespec napTime;
   312     usleep( 10 * 1000 );           /* don't care if it fails. */
   313     napTime.tv_sec = 0;
       
   314     napTime.tv_nsec = 10 * 1000 * 1000;  /* specified in nanoseconds. */
       
   315     nanosleep(&napTime, NULL);           /* don't care if it fails. */
       
   316 } /* __PHYSFS_platformTimeslice */
   313 } /* __PHYSFS_platformTimeslice */
   317 
   314 
   318 
   315 
   319 LinkedStringList *__PHYSFS_platformEnumerateFiles(const char *dirname,
   316 LinkedStringList *__PHYSFS_platformEnumerateFiles(const char *dirname,
   320                                                   int omitSymLinks)
   317                                                   int omitSymLinks)