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