Mercurial > hg > toybox
diff toys/sleep.c @ 535:d51be130fda2
More stabs at getting #includes right, and moving off of deprecated functions.
author | Rob Landley <rob@landley.net> |
---|---|
date | Thu, 08 Mar 2012 20:14:55 -0600 |
parents | ec7dd0ef7eae |
children | 09135436042b |
line wrap: on
line diff
--- a/toys/sleep.c Wed Mar 07 20:05:36 2012 -0600 +++ b/toys/sleep.c Thu Mar 08 20:14:55 2012 -0600 @@ -49,6 +49,7 @@ 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)); } }