Commit 3666660e authored by Michael Smith's avatar Michael Smith

Timing fixes

svn path=/trunk/icecast/; revision=3808
parent 76ff92cb
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment