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
76 Interface Attribute Value
81 T} Thread safety MT-Safe
87 POSIX.1-2001 marks it as obsolete.
88 Removed in POSIX.1-2008.
90 4.3BSD, SUSv2, and POSIX do not define any errors.
92 POSIX.1-2001 does not specify what happens if the
95 .\" This case is not documented in HP-US, Solar, FreeBSD, NetBSD, or OpenBSD!
96 On Linux (and probably most other systems),
97 the effect is to cancel any pending alarm.
101 is an unsigned integer type capable of holding integers
102 in the range [0,1000000].
103 On the original BSD implementation, and in glibc before glibc 2.1,
106 were instead typed as
108 Programs will be more portable if they never mention
112 The interaction of this function with
113 other timer functions such as
118 .BR timer_create (2),
119 .BR timer_delete (2),
120 .BR timer_getoverrun (2),
121 .BR timer_gettime (2),
122 .BR timer_settime (2),
126 This function is obsolete.
129 or POSIX interval timers
130 .RB ( timer_create (2),