sleep

Suspends the execution of the current process for at least the number of seconds indicated by its argument.

Format

#include  <unistd.h>

int sleep  (unsigned seconds);

Argument

seconds
The number of seconds.

Description

This function sleeps for the specified number of seconds, or until a signal is received, or until the process executes a call to SYS$WAKE.

If a SIGALRM signal is generated, but blocked or ignored, the sleep function returns. For all other signals, a blocked or ignored signal does not cause sleep to return.

Return Values
The number of seconds that the process awoke early. 
If the process slept the full number of seconds specified by seconds 


Previous Page | Next Page | Table of Contents | Index