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

NAME

6       ualarm - schedule signal after given number of microseconds
7

SYNOPSIS

9       #define _XOPEN_SOURCE 500     /* Or: #define _BSD_SOURCE */
10       #include <unistd.h>
11
12       useconds_t ualarm(useconds_t usecs, useconds_t interval);
13

DESCRIPTION

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

RETURN VALUE

27       This function returns the number  of  microseconds  remaining  for  any
28       alarm that was previously set, or 0 if no alarm was pending.
29

ERRORS

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

CONFORMING TO

37       4.3BSD,  POSIX.1-2001.   POSIX.1-2001  marks  ualarm()   as   obsolete.
38       4.3BSD, SUSv2, and POSIX do not define any errors.
39

NOTES

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

SEE ALSO

56       alarm(2),    getitimer(2),   nanosleep(2),   select(2),   setitimer(2),
57       usleep(3), feature_test_macros(7), time(7)
58
59
60
61                                  2003-07-24                         UALARM(3)
Impressum