1 .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved. 2 .\" Copyright (c) 1980 Regents of the University of California. All rights reserved. The Berkeley software License Agreement specifies the terms and conditions for redistribution. 3 .\" Portions Copyright (c) 1992, X/Open Company Limited All Rights Reserved. 4 .\" 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 5 .\" http://www.opengroup.org/bookstore/. 6 .\" 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. 7 .\" This notice shall appear on any product containing this material. 8 .Dd "Jul 20, 2014" 9 .Dt USLEEP 3C 10 .Os 11 .Sh NAME 12 .Nm usleep 13 .Nd suspend execution for interval in microseconds 14 .Sh SYNOPSIS 15 .In unistd.h 16 .Ft int 17 .Fn usleep "useconds_t useconds" 18 .Sh DESCRIPTION 19 The 20 .Fn usleep 21 function suspends the caller from execution for the number 22 of microseconds specified by the 23 .Fa useconds 24 argument. The actual suspension 25 time might be less than requested because any caught signal will terminate 26 .Fn usleep 27 following execution of that signal's catching routine. The 28 suspension time might be longer than requested by an arbitrary amount because 29 of the scheduling of other activity in the system. 30 .Lp 31 If the value of 32 .Fa useconds 33 is 0, then the call has no effect. 34 .Lp 35 The use of the 36 usleep 37 function has no effect on the action or blockage 38 of any signal. In a multithreaded process, only the invoking thread is 39 suspended from execution. 40 .Sh RETURN VALUES 41 On completion, 42 .Fn usleep 43 returns 0. There are no error returns. 44 .Sh ERRORS 45 No errors are returned. 46 .Sh USAGE 47 The 48 .Fn usleep 49 function is included for its historical usage and is Obsolete. The 50 .Xr nanosleep 3C 51 function is preferred over this function. 52 .Sh INTERFACE STABILITY 53 .Sy Obsolete Standard . 54 .Sh MT-LEVEL 55 .Sy Safe . 56 .Sh SEE ALSO 57 .Xr nanosleep 3C , 58 .Xr sleep 3C , 59 .Xr standards 5 60 .Sh STANDARDS 61 The 62 .Fn usleep 63 function was introduced in 64 .Bx 4.3 , 65 and then standardized in 66 .St -xpg4.2 . 67 It was subsequently obsoleted in 68 .St -p1003.1-2001 , 69 and removed from 70 .St -p1003.1-2008 .