suspend execution for an interval
cc . . . -lc
int usleep(useconds_t useconds);
The usleep function suspends the current process from
execution for the number of microseconds specified by the
useconds argument. Because of other activity, or because
of the time spent processing the call, the process may be suspended
for longer than specified in useconds.
useconds must be less than one million; if the value is 0,
the call has no effect.
usleep uses the process' realtime interval timer to
indicate to the system when the process should be awakened. There is
one realtime interval timer per process. Previous settings of the
timer are not affected by calls to usleep. If the process
has the timer prior to calling usleep, and if the value
specified in useconds equals or exceeds the timer's prior
setting, the process is awakened just before the timer was set to
Note that it is recommended that the
function be used instead of usleep: usleep is
supplied for historical reasons.
Upon successful completion, usleep returns 0. Otherwise,
-1 is returned and errno is set to indicate the error.
If the following error condition occurs, usleep returns
-1 and sets errno to the corresponding value:
The useconds argument was set to a value equal to or
greater than one million.
usleep is conformant with:
X/Open Portability Guide Issue 4, Version 2 (Spec-1170).
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003