[BACK]Return to nap.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / games / larn

Annotation of src/games/larn/nap.c, Revision 1.5

1.5     ! christos    1: /*     $NetBSD$        */
        !             2:
        !             3: /* nap.c                Larn is copyrighted 1986 by Noah Morgan. */
        !             4: #include <sys/cdefs.h>
1.2       mycroft     5: #ifndef lint
1.5     ! christos    6: __RCSID("$NetBSD$");
        !             7: #endif                         /* not lint */
1.2       mycroft     8:
1.5     ! christos    9: #include <unistd.h>
        !            10: #include "header.h"
        !            11: #include "extern.h"
1.1       cgd        12:
                     13: /*
                     14:  *     routine to take a nap for n milliseconds
                     15:  */
1.5     ! christos   16: void
1.1       cgd        17: nap(x)
1.5     ! christos   18:        int    x;
        !            19: {
        !            20:        if (x <= 0)
        !            21:                return;         /* eliminate chance for infinite loop */
1.1       cgd        22:        lflush();
1.5     ! christos   23:        usleep(x * 1000);
        !            24: }

CVSweb <webmaster@jp.NetBSD.org>