2011-05-23 18:00:31 +00:00
|
|
|
/* See LICENSE file for copyright and license details. */
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include "util.h"
|
|
|
|
|
|
|
|
int
|
|
|
|
main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
unsigned int seconds;
|
|
|
|
|
2011-05-24 10:05:36 +00:00
|
|
|
if(getopt(argc, argv, "") != -1)
|
|
|
|
exit(EXIT_FAILURE);
|
|
|
|
if(optind != argc-1)
|
2011-05-23 18:00:31 +00:00
|
|
|
eprintf("usage: %s seconds\n", argv[0]);
|
|
|
|
|
2011-06-10 04:41:40 +00:00
|
|
|
seconds = strnum(argv[optind], 0);
|
2011-05-23 18:00:31 +00:00
|
|
|
while((seconds = sleep(seconds)) > 0)
|
|
|
|
;
|
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|