DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
(BSD System Compatibility)

sleep(3bsd)


sleep -- (BSD) suspend execution for interval

Synopsis

   /usr/ucb/cc [flag . . . ] file . . .
   

sleep(unsigned seconds);

Description

sleep suspends the current process from execution for the number of seconds specified by the argument. The actual suspension time may be up to 1 second less than that requested, because scheduled wakeups occur at fixed 1-second intervals, and may be an arbitrary amount longer because of other activity in the system.

sleep is implemented by setting an interval timer and pausing until it expires. The previous state of this timer is saved and restored. If the sleep time exceeds the time to the expiration of the previous value of the timer, the process sleeps only until the timer would have expired, and the signal which occurs with the expiration of the timer is sent one second later.

References

getitimer(3C), sigpause(3bsd), usleep(3bsd)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004