xref: /csrg-svn/bin/sleep/sleep.c (revision 42542)
134660Sbostic /*
234660Sbostic  * Copyright (c) 1988 Regents of the University of California.
334660Sbostic  * All rights reserved.
434660Sbostic  *
5*42542Sbostic  * %sccs.include.redist.c%
634660Sbostic  */
734660Sbostic 
834660Sbostic #ifndef lint
934660Sbostic char copyright[] =
1034660Sbostic "@(#) Copyright (c) 1988 Regents of the University of California.\n\
1134660Sbostic  All rights reserved.\n";
1234660Sbostic #endif /* not lint */
1334660Sbostic 
1434660Sbostic #ifndef lint
15*42542Sbostic static char sccsid[] = "@(#)sleep.c	5.4 (Berkeley) 05/31/90";
1634660Sbostic #endif /* not lint */
1734660Sbostic 
1834660Sbostic #include <stdio.h>
1934660Sbostic 
201093Sbill main(argc, argv)
2134660Sbostic 	int argc;
2234660Sbostic 	char **argv;
231093Sbill {
2434660Sbostic 	int secs;
251093Sbill 
2634660Sbostic 	if (argc != 2) {
2734660Sbostic 		fputs("usage: sleep time\n", stderr);
2834660Sbostic 		exit(1);
291093Sbill 	}
3034660Sbostic 	if ((secs = atoi(argv[1])) > 0)
3134660Sbostic 		(void)sleep(secs);
3234660Sbostic 	exit(0);
331093Sbill }
34