diff --git a/src/thread/thread.c b/src/thread/thread.c index 3b6053e6..52519e84 100644 --- a/src/thread/thread.c +++ b/src/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) {