sleep() was returning remaining nanoseconds (kind of), instead the remaining seconds.
This commit is contained in:
parent
5dfc5f1da5
commit
4545af3249
@ -45,26 +45,6 @@
|
||||
#include <nuttx/clock.h>
|
||||
#include <arch/irq.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Type Definitions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
@ -150,7 +130,7 @@ unsigned int sleep(unsigned int seconds)
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
remaining = rmtp.tv_nsec;
|
||||
remaining = rmtp.tv_sec;
|
||||
if (remaining < seconds && rmtp.tv_nsec >= 500000000)
|
||||
{
|
||||
/* Round up */
|
||||
|
Loading…
Reference in New Issue
Block a user