From 4545af3249485271ad91da1a3200fad35ad134de Mon Sep 17 00:00:00 2001 From: Eunbong Song Date: Tue, 15 Nov 2016 06:47:59 -0600 Subject: [PATCH] sleep() was returning remaining nanoseconds (kind of), instead the remaining seconds. --- libc/unistd/lib_sleep.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/libc/unistd/lib_sleep.c b/libc/unistd/lib_sleep.c index 785d76b63b5..70f763f0ce5 100644 --- a/libc/unistd/lib_sleep.c +++ b/libc/unistd/lib_sleep.c @@ -45,26 +45,6 @@ #include #include -/**************************************************************************** - * 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 */