1UALARM(3P) POSIX Programmer's Manual UALARM(3P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
12 ualarm - set the interval timer
13
15 #include <unistd.h>
16
17 useconds_t ualarm(useconds_t useconds, useconds_t interval);
18
19
21 The ualarm() function shall cause the SIGALRM signal to be generated
22 for the calling process after the number of realtime microseconds spec‐
23 ified by the useconds argument has elapsed. When the interval argument
24 is non-zero, repeated timeout notification occurs with a period in
25 microseconds specified by the interval argument. If the notification
26 signal, SIGALRM, is not caught or ignored, the calling process is ter‐
27 minated.
28
29 Implementations may place limitations on the granularity of timer val‐
30 ues. For each interval timer, if the requested timer value requires a
31 finer granularity than the implementation supports, the actual timer
32 value shall be rounded up to the next supported value.
33
34 Interactions between ualarm() and any of the following are unspecified:
35
36
37 alarm()
38 nanosleep()
39 setitimer()
40 timer_create()
41 timer_delete()
42 timer_getoverrun()
43 timer_gettime()
44 timer_settime()
45 sleep()
46
48 The ualarm() function shall return the number of microseconds remaining
49 from the previous ualarm() call. If no timeouts are pending or if
50 ualarm() has not previously been called, ualarm() shall return 0.
51
53 No errors are defined.
54
55 The following sections are informative.
56
58 None.
59
61 Applications are recommended to use nanosleep() if the Timers option is
62 supported, or setitimer(), timer_create(), timer_delete(),
63 timer_getoverrun(), timer_gettime(), or timer_settime() instead of this
64 function.
65
67 None.
68
70 None.
71
73 alarm(), nanosleep(), setitimer(), sleep(), timer_create(),
74 timer_delete(), timer_getoverrun(), the Base Definitions volume of
75 IEEE Std 1003.1-2001, <unistd.h>
76
78 Portions of this text are reprinted and reproduced in electronic form
79 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
80 -- Portable Operating System Interface (POSIX), The Open Group Base
81 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
82 Electrical and Electronics Engineers, Inc and The Open Group. In the
83 event of any discrepancy between this version and the original IEEE and
84 The Open Group Standard, the original IEEE and The Open Group Standard
85 is the referee document. The original Standard can be obtained online
86 at http://www.opengroup.org/unix/online.html .
87
88
89
90IEEE/The Open Group 2003 UALARM(3P)