1UALARM(P)                  POSIX Programmer's Manual                 UALARM(P)
2
3
4

NAME

6       ualarm - set the interval timer
7

SYNOPSIS

9       #include <unistd.h>
10
11       useconds_t ualarm(useconds_t useconds, useconds_t interval);
12
13

DESCRIPTION

15       The  ualarm()  function  shall cause the SIGALRM signal to be generated
16       for the calling process after the number of realtime microseconds spec‐
17       ified by the useconds argument has elapsed.  When the interval argument
18       is non-zero, repeated timeout notification  occurs  with  a  period  in
19       microseconds  specified  by  the interval argument. If the notification
20       signal, SIGALRM, is not caught or ignored, the calling process is  ter‐
21       minated.
22
23       Implementations  may place limitations on the granularity of timer val‐
24       ues. For each interval timer, if the requested timer value  requires  a
25       finer  granularity  than  the implementation supports, the actual timer
26       value shall be rounded up to the next supported value.
27
28       Interactions between ualarm() and any of the following are unspecified:
29
30
31              alarm()
32              nanosleep()
33              setitimer()
34              timer_create()
35              timer_delete()
36              timer_getoverrun()
37              timer_gettime()
38              timer_settime()
39              sleep()
40

RETURN VALUE

42       The ualarm() function shall return the number of microseconds remaining
43       from  the  previous  ualarm()  call.  If  no timeouts are pending or if
44       ualarm() has not previously been called, ualarm() shall return 0.
45

ERRORS

47       No errors are defined.
48
49       The following sections are informative.
50

EXAMPLES

52       None.
53

APPLICATION USAGE

55       Applications are recommended to use nanosleep() if the Timers option is
56       supported,     or    setitimer(),    timer_create(),    timer_delete(),
57       timer_getoverrun(), timer_gettime(), or timer_settime() instead of this
58       function.
59

RATIONALE

61       None.
62

FUTURE DIRECTIONS

64       None.
65

SEE ALSO

67       alarm()  ,  nanosleep()  ,  setitimer()  ,  sleep()  , timer_create() ,
68       timer_delete() , timer_getoverrun() , the Base  Definitions  volume  of
69       IEEE Std 1003.1-2001, <unistd.h>
70
72       Portions  of  this text are reprinted and reproduced in electronic form
73       from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
74       --  Portable  Operating  System  Interface (POSIX), The Open Group Base
75       Specifications Issue 6, Copyright (C) 2001-2003  by  the  Institute  of
76       Electrical  and  Electronics  Engineers, Inc and The Open Group. In the
77       event of any discrepancy between this version and the original IEEE and
78       The  Open Group Standard, the original IEEE and The Open Group Standard
79       is the referee document. The original Standard can be  obtained  online
80       at http://www.opengroup.org/unix/online.html .
81
82
83
84IEEE/The Open Group                  2003                            UALARM(P)
Impressum