1sleep(3C)                Standard C Library Functions                sleep(3C)
2
3
4

NAME

6       sleep - suspend execution for an interval of time
7

SYNOPSIS

9       #include <unistd.h>
10
11       unsigned int sleep(unsigned int seconds);
12
13

DESCRIPTION

15       The caller is suspended from execution for the number of seconds speci‐
16       fied by the argument. The actual suspension time may be less than  that
17       requested  because any caught signal will terminate the sleep() follow‐
18       ing execution of that signal's catching routine.  The  suspension  time
19       may  be  longer  than  requested  by an arbitrary amount because of the
20       scheduling of other activity in  the  system.  The  value  returned  by
21       sleep()  will  be  the ``unslept'' amount (the requested time minus the
22       time actually slept) if the caller incurred premature  arousal  because
23       of a caught signal.
24
25
26       The use of the sleep() function has no effect on the action or blockage
27       of any signal. In a multithreaded process, only the invoking thread  is
28       suspended from execution.
29

ATTRIBUTES

31       See attributes(5) for descriptions of the following attributes:
32
33
34
35
36       ┌─────────────────────────────┬─────────────────────────────┐
37       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
38       ├─────────────────────────────┼─────────────────────────────┤
39       │Interface Stability          │Committed                    │
40       ├─────────────────────────────┼─────────────────────────────┤
41       │MT-Level                     │Async-Signal-Safe            │
42       ├─────────────────────────────┼─────────────────────────────┤
43       │Standard                     │See standards(5).            │
44       └─────────────────────────────┴─────────────────────────────┘
45

SEE ALSO

47       nanosleep(3C), attributes(5), standards(5)
48
49
50
51SunOS 5.11                        5 Feb 2008                         sleep(3C)
Impressum