From b7529b608ea3e56784c7682b382f285008a2fc90 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 8 Mar 2012 20:14:55 -0600 Subject: More stabs at getting #includes right, and moving off of deprecated functions. --- toys/sleep.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'toys/sleep.c') 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)); } } -- cgit v1.2.3