]> git.cameronkatri.com Git - bsdgames-darwin.git/blob - larn/nap.c
Use usleep().
[bsdgames-darwin.git] / larn / nap.c
1 #ifndef lint
2 static char rcsid[] = "$NetBSD: nap.c,v 1.4 1995/04/27 22:15:28 mycroft Exp $";
3 #endif /* not lint */
4
5 /* nap.c Larn is copyrighted 1986 by Noah Morgan. */
6 #include <signal.h>
7 #include <sys/types.h>
8
9 /*
10 * routine to take a nap for n milliseconds
11 */
12 nap(x)
13 register int x;
14 {
15 if (x<=0) return; /* eliminate chance for infinite loop */
16 lflush();
17 usleep(x*1000);
18 }