Commit 16562254 authored by Jack Moffitt's avatar Jack Moffitt

Oddsock found this bug when working with icecast2 on freebsd. Nanoseconds

were off by a few orders of magnitude.

svn path=/trunk/thread/; revision=2187
parent 9d87eecd
......@@ -531,7 +531,7 @@ void thread_sleep(unsigned long len)
int ret;
time_sleep.tv_sec = len / 1000000;
time_sleep.tv_nsec = len % 1000000;
time_sleep.tv_nsec = (len % 1000000) * 1000;
ret = nanosleep(&time_sleep, &time_remaining);
while (ret != 0 && errno == EINTR) {
......
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