AT&T UNIX™PC Unix System V Users Manual - tenox
AT&T UNIX™PC Unix System V Users Manual - tenox AT&T UNIX™PC Unix System V Users Manual - tenox
� I J rj ---
SLEEP (3C) SLEEP ( 3C ) NAME sleep - suspend execution for interval SYNOPSIS unsigned sleep (seconds) unsigned seconds; DESCRIPTION The current process is suspended from execution for the number of seconds specified by the argument. The actual suspension time may be less than that requested for two reasons: ( 1) Because scheduled wakeups occur at fixed 1-second intervals, (on the second, according to an internal clock) and (2) because any caught signal will terminate the sleep following execution of that signal's catching routine. Also, the suspension time may be longer than requested by an arbitrary amount due to the scheduling of other activity in the system. The value returned by sleep will be the "unslept" amount (the requested time minus the time actually slept) in case the caller had an alarm set to go off earlier than the end of the requested sleep time, or premature arousal due to another caught signal. The routine is implemented by setting an alarm signal and pausing until it (or some other signal) occurs. The previous state of the alarm signal is saved and restored. The calling program may have set up an alarm signal before calling sleep; if the sleep time exceeds the time till such alarm signal, the process sleeps only until the alarm signal would have occurred, and the caller's alarm catch routine is executed just before the sleep routine returns, but if the sleep time is less than the time till such alarm, the prior alarm time is reset to go off at the same time it would have without the intervening sleep. SEE ALSO alarm(2), pause(2), signal(2). - 1 -
- Page 928 and 929: MEMORY (3C} MEMORY (3C) Character m
- Page 930 and 931: MENU (3T) (AT&T UNIX PC only ) MENU
- Page 932 and 933: MENU (3T) (AT&T UNIX PC only ) mite
- Page 934 and 935: MENU (3T) (AT&T UNIX PC only ) FILE
- Page 936 and 937: MESSAGE ( 3T ) ( AT&T UNIX PC only
- Page 939: MONITOR ( 3C ) MONITOR ( 3C ) NAME
- Page 943 and 944: PASTE (3T) (AT&T UNIX PC only ) PAS
- Page 945 and 946: PASTE ( 3T ) ( AT&T UNIX PC only )
- Page 947: PERROR (3C) PERROR (3C) NAME perror
- Page 950 and 951: (� / I I I I I I I I I I I I I I
- Page 952 and 953: PRINTF (3S) PRINTF (3S) A field wid
- Page 955 and 956: PUTC ( 3S ) PUTC ( 3S ) NAME putc,
- Page 957: PUTENV (3C) PUTENV (3C) NAME putenv
- Page 960 and 961: ···- ·
- Page 962 and 963: I� ·-.---·
- Page 964 and 965: ' ' .} ' 1 . ' .____.,.:
- Page 966 and 967: � ·�
- Page 968 and 969: REGCMP {3X) REGCMP {3X) ( . . . ) P
- Page 970 and 971: SCANF(3S) u 0 X SCANF(3S) an unsign
- Page 973 and 974: � I SETBUF (3S) SETBUF (3S) NAME
- Page 975 and 976: SETJMP (3C) SETJMP ( 3C ) NAME setj
- Page 977: SINII ( 3M ) SINH ( 3M ) NAME sinh,
- Page 981: SPUTL ( 3X ) SPUTL ( 3X ) NAME sput
- Page 985: STDI0 ( 3S ) ( AT&T UNIX PC Only )
- Page 989 and 990: STRING ( 3C ) STRING (3C) NAME strc
- Page 991 and 992: STRTOD (3C) STRTOD (3C) NAME strtod
- Page 993: STRTOL ( 3C ) STRTOL ( 3C ) NAME st
- Page 996 and 997: C) / I I I I I I I I I () �� /
- Page 998 and 999: n "--- --'•
- Page 1000 and 1001: TAM (3T) (AT&T UNIX PC only ) int w
- Page 1002 and 1003: TAM (3T) (AT&T UNIX PC only ) TAM(3
- Page 1004 and 1005: TAM (3T) wputc() wputs() wprintf()
- Page 1006 and 1007: TAM (3T) (AT&T UNIX PC only ) TAM(3
- Page 1008 and 1009: I I I I I I I II I I I I � r"j I
- Page 1010 and 1011: TMPNAM (3S) TMPNAM (3S) SEE ALSO cr
- Page 1012 and 1013: TRACK (3T) (AT&T UNIX PC only ) TRA
- Page 1015: TRIG ( 3M ) TRIG ( 3M) NAME sin, co
- Page 1018 and 1019: TSEARCH ( 3C ) TSEARCH ( 3C ) data
- Page 1021: TTYNAME ( 3C ) TTYNAME ( 3C ) NAME
- Page 1025 and 1026: UNGETC ( 3S ) UNGETC ( 3S ) NAME un
- Page 1027 and 1028: VPRINTF ( 3S ) VPRINTF ( 3S ) NAME
SLEEP (3C) SLEEP ( 3C )<br />
NAME<br />
sleep - suspend execution for interval<br />
SYNOPSIS<br />
unsigned sleep (seconds)<br />
unsigned seconds;<br />
DESCRIPTION<br />
The current process is suspended from execution for the number of<br />
seconds specified by the argument. The actual suspension time<br />
may be less than that requested for two reasons: ( 1) Because<br />
scheduled wakeups occur at fixed 1-second intervals, (on the<br />
second, according to an internal clock) and (2) because any caught<br />
signal will terminate the sleep following execution of that signal's<br />
catching routine. Also, the suspension time may be longer than<br />
requested by an arbitrary amount due to the scheduling of other<br />
activity in the system. The value returned by sleep will be the<br />
"unslept" amount (the requested time minus the time actually<br />
slept) in case the caller had an alarm set to go off earlier than the<br />
end of the requested sleep time, or premature arousal due to<br />
another caught signal.<br />
The routine is implemented by setting an alarm signal and pausing<br />
until it (or some other signal) occurs. The previous state of<br />
the alarm signal is saved and restored. The calling program may<br />
have set up an alarm signal before calling sleep; if the sleep time<br />
exceeds the time till such alarm signal, the process sleeps only<br />
until the alarm signal would have occurred, and the caller's alarm<br />
catch routine is executed just before the sleep routine returns, but<br />
if the sleep time is less than the time till such alarm, the prior<br />
alarm time is reset to go off at the same time it would have<br />
without the intervening sleep.<br />
SEE ALSO<br />
alarm(2), pause(2), signal(2).<br />
- 1 -