diff options
| -rw-r--r-- | src/xine-utils/utils.c | 10 | 
1 files changed, 10 insertions, 0 deletions
| diff --git a/src/xine-utils/utils.c b/src/xine-utils/utils.c index fa0c11dbe..ab5d9a2ec 100644 --- a/src/xine-utils/utils.c +++ b/src/xine-utils/utils.c @@ -434,6 +434,7 @@ char *xine_chomp(char *str) {   * a thread-safe usecond sleep   */  void xine_usec_sleep(unsigned usec) { +#if 0  #if HAVE_NANOSLEEP    /* nanosleep is prefered on solaris, because it's mt-safe */    struct timespec ts, remaining; @@ -449,6 +450,15 @@ void xine_usec_sleep(unsigned usec) {    usleep(usec);  #  endif  #endif +#else +  if (usec < 10000) { +      usec = 10000; +  } +  struct timeval tm; +  tm.tv_sec  = usec / 1000000; +  tm.tv_usec = usec % 1000000; +  select(0, 0, 0, 0, &tm); +#endif  } | 
