1999-10-05 16:24:54 +00:00
|
|
|
#include "internal.h"
|
|
|
|
#include <stdio.h>
|
|
|
|
|
1999-10-12 22:26:06 +00:00
|
|
|
const char sleep_usage[] = " NUMBER\n"
|
|
|
|
"Pause for NUMBER seconds.\n";
|
1999-10-05 16:24:54 +00:00
|
|
|
|
|
|
|
extern int
|
1999-10-12 22:26:06 +00:00
|
|
|
sleep_main(int argc, char * * argv)
|
1999-10-05 16:24:54 +00:00
|
|
|
{
|
1999-10-12 22:26:06 +00:00
|
|
|
if ( (argc < 2) || (**(argv+1) == '-') ) {
|
1999-10-18 22:28:26 +00:00
|
|
|
usage( sleep_usage );
|
1999-10-12 22:26:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if ( sleep(atoi(*(++argv))) != 0 ) {
|
|
|
|
perror( "sleep");
|
|
|
|
exit (FALSE);
|
|
|
|
} else
|
|
|
|
exit (TRUE);
|
1999-10-05 16:24:54 +00:00
|
|
|
}
|