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

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

usleep(3)

Contents


NAME    [Toc]    [Back]

       usleep - Suspend execution for an interval of time

SYNOPSIS    [Toc]    [Back]

       #include <unistd.h>

       int usleep(
               useconds_t useconds );

       The  following  function  declaration  does not conform to
       current standards and is supported only for backward  compatibility:


       #include <unistd.h>

       void usleep(
               unsigned useconds );

LIBRARY    [Toc]    [Back]

       Standard C Library (libc)

STANDARDS    [Toc]    [Back]

       Interfaces  documented  on  this reference page conform to
       industry standards as follows:

       usleep():  XPG4-UNIX

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

PARAMETERS    [Toc]    [Back]

       Specifies the number of microseconds to sleep.

DESCRIPTION    [Toc]    [Back]

       The  usleep()  function  suspends the current process from
       execution for the number of microseconds specified by  the
       useconds  parameter. Because of other activity in the system,
 or because of the time spent in processing the  call,
       the actual suspension time might be longer than specified.

       The useconds parameter must be less  than  1,000,000.   If
       the  value  of useconds is 0 (zero), the usleep() function
       has no effect.

       In a multithreaded environment, the  sleep()  function  is
       redefined to suspend the calling thread.

RETURN VALUES    [Toc]    [Back]

       On  successful completion, the usleep() function returns 0
       (zero). Otherwise, it returns -1 and sets errno  to  indicate
 the error.

ERRORS    [Toc]    [Back]

       The  usleep()  function sets errno to the specified values
       for the following conditions: The  interval  specified  in
       the useconds parameter exceeds 1,000,000 microseconds.






SEE ALSO    [Toc]    [Back]

      
      
       Functions:    getitimer(2),    sigaction(2),    sigvec(2),
       alarm(3), sleep(3)

       Standards: standards(5)



                                                        usleep(3)
[ Back ]
 Similar pages
Name OS Title
usleep HP-UX suspend execution for an interval
sleep IRIX suspend execution for interval
usleep IRIX suspend execution for an interval
sleep IRIX suspend execution for an interval
sleep HP-UX suspend execution for an interval
usleep NetBSD suspend execution for interval of microseconds
usleep OpenBSD suspend execution for interval of microseconds
sleep OpenBSD suspend process execution for interval of seconds
sleep NetBSD suspend process execution for interval of seconds
usleep FreeBSD suspend process execution for an interval measured in microseconds
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service