Mercurial > hg > toybox
view toys/sleep.c @ 450:d8ff3b0980cf
Minor cleanups to echo: collapse together three tolower() calls, make indent/brackets a bit more regular/obvious, and replace some spaces with tabs in help text (in a way that won't matter until I finish rewriting scripts/config2help.py in C).
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 11 Feb 2012 13:42:24 -0600 |
parents | 7cb15eae1664 |
children | a057cbaeaf16 |
line wrap: on
line source
/* vi: set sw=4 ts=4: * * sleep.c - Wait for a number of seconds. * * Copyright 2007 Rob Landley <rob@landley.net> * * See http://www.opengroup.org/onlinepubs/009695399/utilities/sleep.html USE_SLEEP(NEWTOY(sleep, "<1", TOYFLAG_BIN)) config SLEEP bool "sleep" default y help usage: sleep SECONDS Wait a decimal integer number of seconds. */ #include "toys.h" DEFINE_GLOBALS( long seconds; ) void sleep_main(void) { toys.exitval = sleep(atol(*toys.optargs)); }