*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->FreeBSD man pages -> usleep (3)              
Title
Content
Arch
Section
 

USLEEP(3)

Contents


NAME    [Toc]    [Back]

     usleep -- suspend process execution for an interval measured in microseconds

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <unistd.h>

     int
     usleep(useconds_t microseconds);

DESCRIPTION    [Toc]    [Back]

     The usleep() function suspends execution of the calling process until
     either microseconds microseconds have elapsed or a signal is delivered to
     the process and its action is to invoke a signal-catching function or to
     terminate the process.  System activity may lengthen the sleep by an
     indeterminate amount.

     This function is implemented using nanosleep(2) by pausing for
     microseconds microseconds or until a signal occurs.  Consequently, in
     this implementation, sleeping has no effect on the state of process
     timers, and there is no special handling for SIGALRM.

RETURN VALUES    [Toc]    [Back]

     The usleep() function returns the value 0 if successful; otherwise the
     value -1 is returned and the global variable errno is set to indicate the
     error.

ERRORS    [Toc]    [Back]

     The usleep() function will fail if:

     [EINTR]		A signal was delivered to the process and its action
			was to invoke a signal-catching function.

SEE ALSO    [Toc]    [Back]

      
      
     nanosleep(2), sleep(3)

HISTORY    [Toc]    [Back]

     The usleep() function appeared in 4.3BSD.


FreeBSD 5.2.1		       February 13, 1998		 FreeBSD 5.2.1
[ Back ]
 Similar pages
Name OS Title
nanosleep FreeBSD suspend process execution for an interval measured in nanoseconds
sleep FreeBSD suspend process execution for an interval measured in seconds
usleep NetBSD suspend execution for interval of microseconds
usleep OpenBSD suspend execution for interval of microseconds
sleep NetBSD suspend process execution for interval of seconds
sleep OpenBSD suspend process execution for interval of seconds
sleep HP-UX suspend execution for an interval
usleep HP-UX suspend execution for an interval
usleep IRIX suspend execution for an interval
sleep IRIX suspend execution for an interval
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service