Commit | Line | Data |
---|---|---|
cb026509 KM |
1 | .\" Copyright (c) 1980 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
9f63e283 | 5 | .\" @(#)@(#)ualarm.3 6.3 (Berkeley) %G% |
cb026509 KM |
6 | .\" |
7 | .TH UALARM 3 "" | |
8 | .UC 6 | |
9 | .SH NAME | |
10 | ualarm \- schedule signal after specified time | |
11 | .SH SYNOPSIS | |
12 | .nf | |
cb3aff54 | 13 | .B unsigned ualarm(value, interval) |
cb026509 KM |
14 | .B unsigned value; |
15 | .B unsigned interval; | |
16 | .fi | |
17 | .SH DESCRIPTION | |
18 | .ft B | |
19 | This is a simplified interface to setitimer(2). | |
20 | .ft R | |
21 | .PP | |
22 | .I Ualarm | |
23 | causes signal SIGALRM, see | |
24 | .IR signal (3C), | |
25 | to be sent to the invoking process | |
26 | in a number of microseconds given by the | |
27 | .I value | |
28 | argument. | |
29 | Unless caught or ignored, the signal terminates the process. | |
30 | .PP | |
31 | If the | |
32 | .I interval | |
33 | argument is non-zero, the SIGALRM signal will be sent | |
34 | to the process every | |
35 | .I interval | |
36 | microseconds after the timer expires (e.g. after | |
37 | .I value | |
38 | microseconds have passed). | |
39 | .PP | |
40 | Because of scheduling delays, | |
41 | resumption of execution of when the signal is | |
42 | caught may be delayed an arbitrary amount. | |
43 | The longest specifiable delay time (on the vax) is 2147483647 microseconds. | |
44 | .PP | |
45 | The return value is the amount of time previously remaining in the alarm clock. | |
9f63e283 | 46 | .SH BUGS |
cb026509 KM |
47 | This routine is expensive to use because it is implemented using |
48 | .IR setitimer (2) | |
49 | and does eight system calls each time it is invoked. | |
50 | .SH "SEE ALSO" | |
51 | getitimer(2), setitimer(2), sigpause(2), sigvec(2), signal(3C), sleep(3), | |
52 | alarm(3), ualarm(3) |