1993-08-02 21:18:41 +04:00
|
|
|
#ifndef lint
|
1995-04-28 02:15:28 +04:00
|
|
|
static char rcsid[] = "$NetBSD: nap.c,v 1.4 1995/04/27 22:15:28 mycroft Exp $";
|
1993-08-02 21:18:41 +04:00
|
|
|
#endif /* not lint */
|
|
|
|
|
1993-03-21 12:45:37 +03:00
|
|
|
/* nap.c Larn is copyrighted 1986 by Noah Morgan. */
|
|
|
|
#include <signal.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* routine to take a nap for n milliseconds
|
|
|
|
*/
|
|
|
|
nap(x)
|
|
|
|
register int x;
|
|
|
|
{
|
|
|
|
if (x<=0) return; /* eliminate chance for infinite loop */
|
|
|
|
lflush();
|
1995-04-28 02:15:28 +04:00
|
|
|
usleep(x*1000);
|
1993-03-21 12:45:37 +03:00
|
|
|
}
|