Content-type: text/html Man page of usleep

usleep

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

NAME

usleep - suspend execution for interval in microseconds  

SYNOPSIS

#include <unistd.h>

int usleep(useconds_t useconds);  

DESCRIPTION

The usleep() function suspends the caller from execution for the number of microseconds specified by the useconds argument. The actual suspension time might be less than requested because any caught signal will terminate usleep() following execution of that signal's catching routine. The suspension time might be longer than requested by an arbitrary amount because of the scheduling of other activity in the system.

If the value of useconds is 0, then the call has no effect.

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

RETURN VALUES

On completion, usleep() returns 0. There are no error retruns.  

ERRORS

No errors are returned.  

USAGE

The usleep() function is included for its historical usage. The nanosleep(3RT) function is preferred over this function.  

ATTRIBUTES

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

ATTRIBUTE TYPEATTRIBUTE VALUE
Interface StabilityStandard
MT-LevelSafe

 

SEE ALSO

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


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUES
ERRORS
USAGE
ATTRIBUTES
SEE ALSO

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