Content-type: text/html Man page of sleep

sleep

Section: Standard C Library Functions (3C)
Updated: 16 Mar 2005
Index Return to Main Contents
 

NAME

sleep - suspend execution for an interval of time  

SYNOPSIS

#include <unistd.h>

unsigned int sleep(unsigned int seconds);  

DESCRIPTION

The caller is suspended from execution for the number of seconds specified by the argument. The actual suspension time may be less than that requested because any caught signal will terminate the sleep() following execution of that signal's catching routine. 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 sleep() will be the ``unslept'' amount (the requested time minus the time actually slept) if the caller incurred premature arousal because of a caught signal.

The use of the sleep() function has no effect on the action or blockage of any signal. In a multithreaded process, only the invoking thread is suspended from execution.  

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
Interface StabilityStandard
MT-LevelAsync-Signal-Safe

 

SEE ALSO

nanosleep(3RT), attributes(5), standards(5)


 

Index

NAME
SYNOPSIS
DESCRIPTION
ATTRIBUTES
SEE ALSO

This document was created by man2html, using the manual pages.
Time: 02:37:26 GMT, October 02, 2010