2 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
4 .\" SPDX-License-Identifier: GPL-2.0-or-later
6 .TH ualarm 3 (date) "Linux man-pages (unreleased)"
8 ualarm \- schedule signal after given number of microseconds
11 .RI ( libc ", " \-lc )
14 .B "#include <unistd.h>"
16 .BI "useconds_t ualarm(useconds_t " usecs ", useconds_t " interval );
20 Feature Test Macro Requirements for glibc (see
21 .BR feature_test_macros (7)):
27 (_XOPEN_SOURCE >= 500) && ! (_POSIX_C_SOURCE >= 200809L)
28 || /* glibc >= 2.19: */ _DEFAULT_SOURCE
29 || /* glibc <= 2.19: */ _BSD_SOURCE
31 _BSD_SOURCE || _XOPEN_SOURCE >= 500
32 .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED
37 function causes the signal
39 to be sent to the invoking process after (not less than)
42 The delay may be lengthened slightly by any system activity
43 or by the time spent processing the call or by the
44 granularity of system timers.
46 Unless caught or ignored, the
48 signal will terminate the process.
52 argument is nonzero, further
54 signals will be sent every
56 microseconds after the first.
58 This function returns the number of microseconds remaining for
59 any alarm that was previously set, or 0 if no alarm was pending.
63 Interrupted by a signal; see
67 \fIusecs\fP or \fIinterval\fP is not smaller than 1000000.
68 (On systems where that is considered an error.)
70 For an explanation of the terms used in this section, see
78 Interface Attribute Value
81 T} Thread safety MT-Safe
91 POSIX.1-2008 removes the specification of
93 4.3BSD, SUSv2, and POSIX do not define any errors.
95 POSIX.1-2001 does not specify what happens if the
98 .\" This case is not documented in HP-US, Solar, FreeBSD, NetBSD, or OpenBSD!
99 On Linux (and probably most other systems),
100 the effect is to cancel any pending alarm.
104 is an unsigned integer type capable of holding integers
105 in the range [0,1000000].
106 On the original BSD implementation, and in glibc before glibc 2.1,
109 were instead typed as
111 Programs will be more portable if they never mention
115 The interaction of this function with
116 other timer functions such as
121 .BR timer_create (2),
122 .BR timer_delete (2),
123 .BR timer_getoverrun (2),
124 .BR timer_gettime (2),
125 .BR timer_settime (2),
129 This function is obsolete.
132 or POSIX interval timers
133 .RB ( timer_create (2),