1 /* nap.c Larn is copyrighted 1986 by Noah Morgan. */ 2 /* $FreeBSD: src/games/larn/nap.c,v 1.4 1999/11/16 02:57:23 billf Exp $ */ 3 /* $DragonFly: src/games/larn/nap.c,v 1.4 2006/08/26 17:05:05 pavalos Exp $ */ 4 #include "header.h" 5 /* 6 * routine to take a nap for n milliseconds 7 */ 8 void nap(int x)9nap(int x) 10 { 11 if (x <= 0) /* eliminate chance for infinite loop */ 12 return; 13 lflush(); 14 usleep(x * 1000); 15 } 16