diff options
author | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-11-23 19:32:35 +0000 |
---|---|---|
committer | Darren Salt <linux@youmustbejoking.demon.co.uk> | 2007-11-23 19:32:35 +0000 |
commit | 740cb399dcf72420ac0c8a6048dca8fac09daf3d (patch) | |
tree | 92b18c4be7212b84b99ecb94e1d81be8027a03f8 /src/xine-utils/utils.c | |
parent | ff8930972b4242d31e540a38f1d8053e846d68e6 (diff) | |
parent | c1f730ab426636b5fea1dc657d2278950ace5de6 (diff) | |
download | xine-lib-740cb399dcf72420ac0c8a6048dca8fac09daf3d.tar.gz xine-lib-740cb399dcf72420ac0c8a6048dca8fac09daf3d.tar.bz2 |
Merge.
Diffstat (limited to 'src/xine-utils/utils.c')
-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 47c32b713..c5f18a699 100644 --- a/src/xine-utils/utils.c +++ b/src/xine-utils/utils.c @@ -431,6 +431,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; @@ -446,6 +447,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 } |