2011-05-23 18:00:31 +00:00
|
|
|
/* See LICENSE file for copyright and license details. */
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
2014-11-13 17:29:30 +00:00
|
|
|
|
2011-05-23 18:00:31 +00:00
|
|
|
#include "util.h"
|
|
|
|
|
2013-06-14 18:20:47 +00:00
|
|
|
static void
|
|
|
|
usage(void)
|
|
|
|
{
|
2015-01-30 12:41:36 +00:00
|
|
|
eprintf("usage: %s num\n", argv0);
|
2013-06-14 18:20:47 +00:00
|
|
|
}
|
|
|
|
|
2011-05-23 18:00:31 +00:00
|
|
|
int
|
|
|
|
main(int argc, char *argv[])
|
|
|
|
{
|
2015-01-30 13:14:22 +00:00
|
|
|
unsigned int seconds;
|
2011-05-23 18:00:31 +00:00
|
|
|
|
2013-06-14 18:20:47 +00:00
|
|
|
ARGBEGIN {
|
|
|
|
default:
|
|
|
|
usage();
|
|
|
|
} ARGEND;
|
2011-05-23 18:00:31 +00:00
|
|
|
|
2014-11-13 17:29:30 +00:00
|
|
|
if (argc < 1)
|
2013-06-14 18:20:47 +00:00
|
|
|
usage();
|
|
|
|
|
2015-01-30 13:24:55 +00:00
|
|
|
seconds = estrtoul(argv[0], 0);
|
2014-11-13 17:29:30 +00:00
|
|
|
while ((seconds = sleep(seconds)) > 0)
|
2011-05-23 18:00:31 +00:00
|
|
|
;
|
2014-10-02 22:46:04 +00:00
|
|
|
return 0;
|
2011-05-23 18:00:31 +00:00
|
|
|
}
|