From a3c3d6f277375ce9ca6215b0a6aa6b75879966b2 Mon Sep 17 00:00:00 2001 From: Jack Moffitt Date: Sat, 20 Oct 2001 03:39:10 +0000 Subject: [PATCH] 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 --- thread/thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thread/thread.c b/thread/thread.c index 3b6053e..52519e8 100644 --- a/thread/thread.c +++ b/thread/thread.c @@ -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) {