Fixed nsec calculation
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@269 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
637618e8bb
commit
c574123ca4
@ -92,7 +92,7 @@ void usleep(unsigned long usec)
|
|||||||
{
|
{
|
||||||
(void)sigemptyset(&set);
|
(void)sigemptyset(&set);
|
||||||
ts.tv_sec = usec / 1000000;
|
ts.tv_sec = usec / 1000000;
|
||||||
ts.tv_nsec = usec % 1000;
|
ts.tv_nsec = (usec % 1000000) * 1000;
|
||||||
(void)sigtimedwait(&set, &value, &ts);
|
(void)sigtimedwait(&set, &value, &ts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user