Commit | Line | Data |
---|---|---|
ae59e04c CL |
1 | .\" Copyright (c) 1986, 1991 Regents of the University of California. |
2 | .\" All rights reserved. | |
cb026509 | 3 | .\" |
ae59e04c | 4 | .\" %sccs.include.redist.man% |
cb026509 | 5 | .\" |
ae59e04c CL |
6 | .\" @(#)ualarm.3 6.5 (Berkeley) %G% |
7 | .\" | |
8 | .Dd | |
9 | .Dt UALARM 3 | |
10 | .Os BSD 4.3 | |
11 | .Sh NAME | |
12 | .Nm ualarm | |
13 | .Nd schedule signal after specified time | |
14 | .Sh SYNOPSIS | |
15 | .Fd #include <unistd.h> | |
16 | .Ft u_int | |
17 | .Fn ualarm "u_int microseconds" "u_int interval" | |
18 | .Sh DESCRIPTION | |
19 | .Bf -symbolic | |
cb026509 | 20 | This is a simplified interface to setitimer(2). |
ae59e04c CL |
21 | .Ef |
22 | .Pp | |
23 | The | |
24 | .Fn ualarm | |
25 | function | |
26 | waits a count of | |
27 | .Ar microseconds | |
28 | before asserting the terminating signal | |
29 | .Dv SIGALRM . | |
30 | System activity or time used in processing the call may cause a slight | |
31 | delay. | |
32 | .Pp | |
cb026509 | 33 | If the |
ae59e04c CL |
34 | .Fa interval |
35 | argument is non-zero, the | |
36 | .Dv SIGALRM | |
37 | signal will be sent | |
cb026509 | 38 | to the process every |
ae59e04c | 39 | .Fa interval |
cb026509 | 40 | microseconds after the timer expires (e.g. after |
ae59e04c | 41 | .Fa value |
cb026509 | 42 | microseconds have passed). |
ae59e04c CL |
43 | .Sh RETURN VALUES |
44 | When the signal has successfully been caught, | |
45 | .Fn alarm | |
46 | returns the amount of time left on the clock. | |
47 | The maximum mumber of | |
48 | .Ar microseconds | |
49 | allowed | |
50 | is 2147483647. | |
51 | .Sh SEE ALSO | |
52 | .Xr getitimer 2 , | |
53 | .Xr setitimer 2 , | |
54 | .Xr sigpause 2 , | |
55 | .Xr sigvec 2 , | |
56 | .Xr signal 3 , | |
57 | .Xr sleep 3 , | |
58 | .Xr alarm 3 , | |
59 | .Xr usleep 3 | |
60 | .Sh HISTORY | |
61 | The | |
62 | .Fn ualarm | |
63 | function appeared in | |
64 | .Bx 4.3 . |