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

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

USLEEP(3)

Contents


NAME    [Toc]    [Back]

     usleep - suspend execution for interval of 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 the number of microseconds specified by microseconds have elapsed
     or a signal is delivered to the calling process and its action is to
     invoke a signal catching function or to terminate the process.  The suspension
 time may be longer than requested due to the scheduling of other
     activity by the system.

     The microseconds argument must be less than 1,000,000.  If the value of
     microseconds is 0, then the call has no effect.

RETURN VALUES    [Toc]    [Back]

     On successful completition, usleep() returns 0.  Otherwhise, it returns
     -1 and sets errno to indicate the error.

ERRORS    [Toc]    [Back]

     The usleep() function may fail if:

     [EINVAL]           The microseconds interval specified 1,000,000 or more
                        microseconds.

SEE ALSO    [Toc]    [Back]

      
      
     nanosleep(2), sleep(3)

STANDARDS    [Toc]    [Back]

     The usleep() function conforms to X/Open Portability Guide Issue 4.2
     (``XPG4.2'').

HISTORY    [Toc]    [Back]

     The usleep() function appeared in 4.3BSD.

BSD                              June 4, 1993                              BSD
[ Back ]
 Similar pages
Name OS Title
usleep FreeBSD suspend process execution for an interval measured in microseconds
sleep IRIX suspend execution for an interval
sleep HP-UX suspend execution for an interval
usleep HP-UX suspend execution for an interval
sleep IRIX suspend execution for interval
usleep IRIX suspend execution for an interval
usleep Tru64 Suspend execution for an interval of time
sleep OpenBSD suspend execution for an interval of time
sleep Tru64 Suspend execution for an interval of time
sleep FreeBSD suspend execution for an interval of time
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service