From c574123ca421209282d0067d712675f6af3c53c9 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 7 Jun 2007 00:14:35 +0000 Subject: [PATCH] Fixed nsec calculation git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@269 42af7a65-404d-4744-a932-0658087f49c3 --- sched/usleep.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sched/usleep.c b/sched/usleep.c index 69e379c7bc..be3c92f53e 100644 --- a/sched/usleep.c +++ b/sched/usleep.c @@ -92,7 +92,7 @@ void usleep(unsigned long usec) { (void)sigemptyset(&set); ts.tv_sec = usec / 1000000; - ts.tv_nsec = usec % 1000; + ts.tv_nsec = (usec % 1000000) * 1000; (void)sigtimedwait(&set, &value, &ts); } }