1
by Francesco Paolo Lovergine
rules: linking manpages-posix not manpages. |
1 |
.\" Copyright (c) 2001-2003 The Open Group, All Rights Reserved |
2
by Francesco Paolo Lovergine
* Alligned to linux main manpages edition. |
2 |
.TH "UALARM" P 2003 "IEEE/The Open Group" "POSIX Programmer's Manual" |
1
by Francesco Paolo Lovergine
rules: linking manpages-posix not manpages. |
3 |
.\" ualarm |
4 |
.SH NAME |
|
5 |
ualarm \- set the interval timer
|
|
6 |
.SH SYNOPSIS |
|
7 |
.LP
|
|
8 |
\fB#include <unistd.h>
|
|
9 |
.br
|
|
10 |
.sp
|
|
11 |
useconds_t ualarm(useconds_t\fP \fIuseconds\fP\fB, useconds_t\fP \fIinterval\fP\fB); |
|
12 |
\fP
|
|
13 |
\fB
|
|
14 |
.br
|
|
15 |
\fP
|
|
16 |
.SH DESCRIPTION |
|
17 |
.LP
|
|
18 |
The \fIualarm\fP() function shall cause the SIGALRM signal to be generated |
|
19 |
for the calling process after the number of realtime |
|
20 |
microseconds specified by the \fIuseconds\fP argument has elapsed. |
|
21 |
When the \fIinterval\fP argument is non-zero, repeated timeout |
|
22 |
notification occurs with a period in microseconds specified by the |
|
23 |
\fIinterval\fP argument. If the notification signal, SIGALRM, |
|
24 |
is not caught or ignored, the calling process is terminated. |
|
25 |
.LP
|
|
26 |
Implementations may place limitations on the granularity of timer |
|
27 |
values. For each interval timer, if the requested timer value |
|
28 |
requires a finer granularity than the implementation supports, the |
|
29 |
actual timer value shall be rounded up to the next supported |
|
30 |
value. |
|
31 |
.LP
|
|
32 |
Interactions between \fIualarm\fP() and any of the following are unspecified: |
|
33 |
.sp
|
|
34 |
.RS
|
|
35 |
.nf
|
|
36 |
||
37 |
\fIalarm\fP() |
|
38 |
\fInanosleep\fP() |
|
39 |
\fIsetitimer\fP() |
|
40 |
\fItimer_create\fP() |
|
41 |
\fItimer_delete\fP() |
|
42 |
\fItimer_getoverrun\fP() |
|
43 |
\fItimer_gettime\fP() |
|
44 |
\fItimer_settime\fP() |
|
45 |
\fIsleep\fP() |
|
46 |
.fi
|
|
47 |
.RE
|
|
48 |
.SH RETURN VALUE |
|
49 |
.LP
|
|
50 |
The \fIualarm\fP() function shall return the number of microseconds |
|
51 |
remaining from the previous \fIualarm\fP() call. If no |
|
52 |
timeouts are pending or if \fIualarm\fP() has not previously been |
|
53 |
called, \fIualarm\fP() shall return 0. |
|
54 |
.SH ERRORS |
|
55 |
.LP
|
|
56 |
No errors are defined. |
|
57 |
.LP
|
|
58 |
\fIThe following sections are informative.\fP |
|
59 |
.SH EXAMPLES |
|
60 |
.LP
|
|
61 |
None. |
|
62 |
.SH APPLICATION USAGE |
|
63 |
.LP
|
|
64 |
Applications are recommended to use \fInanosleep\fP() if the Timers |
|
65 |
option is |
|
66 |
supported, or \fIsetitimer\fP(), \fItimer_create\fP(), \fItimer_delete\fP(), |
|
67 |
\fItimer_getoverrun\fP(), \fItimer_gettime\fP(), or \fItimer_settime\fP() |
|
68 |
instead of this function. |
|
69 |
.SH RATIONALE |
|
70 |
.LP
|
|
71 |
None. |
|
72 |
.SH FUTURE DIRECTIONS |
|
73 |
.LP
|
|
74 |
None. |
|
75 |
.SH SEE ALSO |
|
76 |
.LP
|
|
77 |
\fIalarm\fP() , \fInanosleep\fP() , \fIsetitimer\fP() , \fIsleep\fP() |
|
78 |
, \fItimer_create\fP() , \fItimer_delete\fP() , \fItimer_getoverrun\fP() |
|
79 |
, the Base Definitions volume of IEEE\ Std\ 1003.1-2001, \fI<unistd.h>\fP |
|
80 |
.SH COPYRIGHT |
|
81 |
Portions of this text are reprinted and reproduced in electronic form |
|
82 |
from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology |
|
83 |
-- Portable Operating System Interface (POSIX), The Open Group Base |
|
84 |
Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of |
|
85 |
Electrical and Electronics Engineers, Inc and The Open Group. In the |
|
86 |
event of any discrepancy between this version and the original IEEE and |
|
87 |
The Open Group Standard, the original IEEE and The Open Group Standard |
|
88 |
is the referee document. The original Standard can be obtained online at |
|
89 |
http://www.opengroup.org/unix/online.html . |