1UALARM(3)                  Linux Programmer's Manual                 UALARM(3)
2
3
4

NAME

6       ualarm - schedule signal after given number of microseconds
7

SYNOPSIS

9       #include <unistd.h>
10
11       useconds_t ualarm(useconds_t usecs, useconds_t interval);
12
13   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
14
15       ualarm(): _BSD_SOURCE || _XOPEN_SOURCE >= 500
16

DESCRIPTION

18       The  ualarm()  function  causes  the  signal  SIGALRM to be sent to the
19       invoking process after (not less than) usecs microseconds.   The  delay
20       may  be lengthened slightly by any system activity or by the time spent
21       processing the call or by the granularity of system timers.
22
23       Unless caught  or  ignored,  the  SIGALRM  signal  will  terminate  the
24       process.
25
26       If  the  interval  argument is nonzero, further SIGALRM signals will be
27       sent every interval microseconds after the first.
28

RETURN VALUE

30       This function returns the number  of  microseconds  remaining  for  any
31       alarm that was previously set, or 0 if no alarm was pending.
32

ERRORS

34       EINTR  Interrupted by a signal.
35
36       EINVAL usecs  or  interval  is  not  smaller than 1000000.  (On systems
37              where that is considered an error.)
38

CONFORMING TO

40       4.3BSD,  POSIX.1-2001.   POSIX.1-2001  marks  ualarm()   as   obsolete.
41       POSIX.1-2008 removes the specification of ualarm().  4.3BSD, SUSv2, and
42       POSIX do not define any errors.
43

NOTES

45       The type useconds_t is an unsigned  integer  type  capable  of  holding
46       integers in the range [0,1000000].  On the original BSD implementation,
47       and in glibc before version 2.1, the arguments to ualarm() were instead
48       typed  as  unsigned  int.  Programs will be more portable if they never
49       mention useconds_t explicitly.
50
51       The interaction of this function with other  timer  functions  such  as
52       alarm(2),   sleep(3),   nanosleep(2),   setitimer(2),  timer_create(2),
53       timer_delete(2),  timer_getoverrun(2),   timer_gettime(2),   timer_set‐
54       time(2), usleep(3) is unspecified.
55
56       This  function  is obsolete.  Use setitimer(2) or POSIX interval timers
57       (timer_create(2), etc.)  instead.
58

SEE ALSO

60       alarm(2),   getitimer(2),   nanosleep(2),   select(2),    setitimer(2),
61       usleep(3), time(7)
62

COLOPHON

64       This  page  is  part of release 3.25 of the Linux man-pages project.  A
65       description of the project, and information about reporting  bugs,  can
66       be found at http://www.kernel.org/doc/man-pages/.
67
68
69
70                                  2008-08-06                         UALARM(3)
Impressum