1 '\" te
   2 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.
   3 .\" Copyright (c) 1980 Regents of the University of California.  All rights reserved.  The Berkeley software License Agreement specifies the terms and conditions for redistribution.
   4 .\" Portions Copyright (c) 1992, X/Open Company Limited  All Rights Reserved.
   5 .\" Sun Microsystems, Inc. gratefully acknowledges The Open Group for permission to reproduce portions of its copyrighted documentation. Original documentation from The Open Group can be obtained online at
   6 .\" http://www.opengroup.org/bookstore/.
   7 .\" The Institute of Electrical and Electronics Engineers and The Open Group, have given us permission to reprint portions of their documentation. In the following statement, the phrase "this text" refers to portions of the system documentation. Portions of this text are reprinted and reproduced in electronic form in the Sun OS Reference Manual, from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between these versions and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html.
   8 .\"  This notice shall appear on any product containing this material.
   9 .TH USLEEP 3C "Feb 5, 2008"
  10 .SH NAME
  11 usleep \- suspend execution for interval in microseconds
  12 .SH SYNOPSIS
  13 .LP
  14 .nf
  15 #include <unistd.h>
  16 
  17 \fBint\fR \fBusleep\fR(\fBuseconds_t\fR \fIuseconds\fR);
  18 .fi
  19 
  20 .SH DESCRIPTION
  21 .sp
  22 .LP
  23 The \fBusleep()\fR function suspends the caller from execution for the number
  24 of microseconds specified by the \fIuseconds\fR argument. The actual suspension
  25 time might be less than requested because any caught signal will terminate
  26 \fBusleep()\fR following execution of that signal's catching routine. The
  27 suspension time might be longer than requested by an arbitrary amount because
  28 of the scheduling of other activity in the system.
  29 .sp
  30 .LP
  31 If the value of \fIuseconds\fR is 0, then the call has no effect.
  32 .sp
  33 .LP
  34 The use of the \fBusleep()\fR function has no effect on the action or blockage
  35 of any signal. In a multithreaded process, only the invoking thread is
  36 suspended from execution.
  37 .SH RETURN VALUES
  38 .sp
  39 .LP
  40 On completion, \fBusleep()\fR returns \fB0\fR. There are no error returns.
  41 .SH ERRORS
  42 .sp
  43 .LP
  44 No errors are returned.
  45 .SH USAGE
  46 .sp
  47 .LP
  48 The \fBusleep()\fR function is included for its historical usage.  The
  49 \fBnanosleep\fR(3C) function is preferred over this function.
  50 .SH ATTRIBUTES
  51 .sp
  52 .LP
  53 See \fBattributes\fR(5) for descriptions of the following attributes:
  54 .sp
  55 
  56 .sp
  57 .TS
  58 box;
  59 c | c
  60 l | l .
  61 ATTRIBUTE TYPE  ATTRIBUTE VALUE
  62 _
  63 Interface Stability     Committed
  64 _
  65 MT-Level        Safe
  66 _
  67 Standard        See \fBstandards\fR(5).
  68 .TE
  69 
  70 .SH SEE ALSO
  71 .sp
  72 .LP
  73 \fBnanosleep\fR(3C), \fBsleep\fR(3C), \fBattributes\fR(5), \fBstandards\fR(5)