Xinu7/man/man2/sleep.doc




SLEEP(2)            Xinu Programmer's Manual             SLEEP(2)



NAME
     sleep, sleep10 - go to sleep for a specified time

SYNOPSIS
     int sleep(secs)
     int sleep10(tenths)
     int secs;
     int tenths;

DESCRIPTION
     In either form, _s_l_e_e_p causes the current process to delay
     for a specified time and then resume.  The form _s_l_e_e_p
     expects the delay to be given in an integral number of
     seconds; it is most useful for longer delays.  The form
     _s_l_e_e_p_1_0 expects the delay to be given in an integral number
     of tenths of seconds; it is most useful for short delays.

     Both forms return SYSERR if the argument is negative or if
     the line time clock is not enabled on the processor.  Other-
     wise they delay for the specified time and return OK.

SEE ALSO
     suspend(2), unsleep(2)

BUGS
     The maximum sleep is 32767 seconds (about 546 minutes, or
     9.1 hours).  Sleep guarantees a lower bound on delay, but
     since the system may delay processing of interrupts at
     times, sleep cannot guarantee an upper bound.


























Version 6b               Printed 1/12/87                        1