suspend execution for interval
unsigned sleep (unsigned seconds);
The current process is suspended from execution for the number
specified by the argument.
The actual suspension time may be less than
that requested because any caught
signal will terminate the
following execution of that signal's catching routine.
Also, the suspension time may be longer than requested
by an arbitrary amount because of the scheduling of other
activity in the system.
The value returned by
will be the ``unslept'' amount (the requested time minus the time
actually slept) in case the caller had an alarm set to go off
earlier than the end of the requested
time, or premature arousal because of another caught signal.
The routine is implemented by setting an alarm signal
and pausing until it (or some other signal) occurs.
The previous state of the alarm signal is saved and restored.
The calling program may have set up an alarm signal before calling
time exceeds the time until such alarm signal,
the process sleeps only until the alarm signal would
The caller's alarm catch routine is
executed just before the
But if the
time is less than the time till such alarm,
the prior alarm time is reset to go off at the same time it
would have without the intervening
Considerations for threads programming
The Threads Library allows each thread to sleep
independently of the others.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004