mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2025-02-02 15:07:36 -05:00
Timing fixes
svn path=/trunk/icecast/; revision=3808
This commit is contained in:
parent
76ff92cb2f
commit
3666660ef6
@ -568,7 +568,7 @@ void thread_sleep(unsigned long len)
|
||||
struct timeval tv;
|
||||
|
||||
tv.tv_sec = len / 1000000;
|
||||
tv.tv_usec = (len % 1000000) / 1000;
|
||||
tv.tv_usec = (len % 1000000);
|
||||
|
||||
select(0, NULL, NULL, NULL, &tv);
|
||||
# endif
|
||||
|
@ -60,7 +60,7 @@ int util_timed_wait_for_fd(int fd, int timeout)
|
||||
FD_SET(fd, &rfds);
|
||||
|
||||
tv.tv_sec = timeout/1000;
|
||||
tv.tv_usec = (timeout - tv.tv_sec)*1000;
|
||||
tv.tv_usec = (timeout % 1000)*1000;
|
||||
|
||||
return select(fd+1, &rfds, NULL, NULL, &tv);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user