Home | History | Annotate | Line # | Download | only in larn
nap.c revision 1.5
      1 /*	$NetBSD: nap.c,v 1.5 1997/10/18 20:03:36 christos Exp $	*/
      2 
      3 /* nap.c		 Larn is copyrighted 1986 by Noah Morgan. */
      4 #include <sys/cdefs.h>
      5 #ifndef lint
      6 __RCSID("$NetBSD: nap.c,v 1.5 1997/10/18 20:03:36 christos Exp $");
      7 #endif				/* not lint */
      8 
      9 #include <unistd.h>
     10 #include "header.h"
     11 #include "extern.h"
     12 
     13 /*
     14  *	routine to take a nap for n milliseconds
     15  */
     16 void
     17 nap(x)
     18 	int    x;
     19 {
     20 	if (x <= 0)
     21 		return;		/* eliminate chance for infinite loop */
     22 	lflush();
     23 	usleep(x * 1000);
     24 }
     25