aboutsummaryrefslogtreecommitdiff
path: root/toys/sleep.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/sleep.c')
-rw-r--r--toys/sleep.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/toys/sleep.c b/toys/sleep.c
index d56678bb..471011be 100644
--- a/toys/sleep.c
+++ b/toys/sleep.c
@@ -49,6 +49,7 @@ void sleep_main(void)
l = (unsigned long)d;
d -= l;
if (l) toys.exitval = sleep(l);
- if (!toys.exitval) toys.exitval = usleep((unsigned long)(d * 1000000));
+ if (!toys.exitval)
+ toys.exitval = nanosleep((unsigned long)(d * 1000000000));
}
}