From c37046e6a95d6b1a96cfd73851bc017401632319 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Thu, 30 Sep 2010 08:58:19 -0400 Subject: [PATCH] Fix wusleep struct timespec's tm_nsec is in nanoseconds, not microseconds. Signed-off-by: Brad Jorsch --- WINGs/usleep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WINGs/usleep.c b/WINGs/usleep.c index acf0583d..fcdf3277 100644 --- a/WINGs/usleep.c +++ b/WINGs/usleep.c @@ -16,7 +16,7 @@ void wusleep(unsigned int usec) return; tm.tv_sec = usec / 1000000; - tm.tv_nsec = usec % 1000000; + tm.tv_nsec = (usec % 1000000) * 1000; while (nanosleep(&tm, &tm) == -1 && errno == EINTR) ;