HP C/iX Library Reference Manual (30026-90004)
316 Chapter5
HP C/iX Library Function Descriptions
sleep
sleep
Suspends program execution for an interval.
Syntax
unsigned long sleep (unsigned long
seconds
);
Parameters
seconds
The number of seconds to suspend program execution.
Return Values
x The difference between the requested sleep time and the actual sleep time.
Description
The current process is suspended from execution for the number of seconds speciļ¬ed by the
argument.
The suspension time can be longer than requested by an arbitrary amount due to the
scheduling of other activity in the system.
The
seconds
parameter must be less than 2,147,485.
The sleep function returns the difference of the requested sleep time and the actual sleep
time if the actual sleep time is less than the requested sleep time.
NOTE
If linking with the POSIX/iX library, refer to the description of sleep()
located in the MPE/iX Developer's Kit Reference Manual.