VMS Help
CRTL, usleep
*Conan The Librarian
|
Suspends execution for an interval.
Format
#include <unistd.h>
int usleep (unsigned int mseconds);
mseconds
The number of microseconds to suspend execution for.
The usleep function suspends the current process from execution
for the number of microseconds specified by the mseconds
argument. This argument must be less than 1,000,000. However,
if its value is 0, then the call has no effect.
Be aware that usleep time specifications are rounded up
approximately to the next millisecond because that is the finest
time interval granularity possible on OpenVMS systems.
There is one real-time interval timer for each process. The
usleep function does not interfere with a previous setting of
this timer. If the process set this timer before calling usleep
and if the time specified by mseconds equals or exceeds the
interval timer's prior setting, then the process is awakened
shortly before the timer was set to expire.
0 Indicates success.
-1 Indicates an error occurred; errno is set to
EINVAL.