put reasonable header on it
[unix-history] / usr / src / lib / libc / gen / ualarm.3
... / ...
CommitLineData
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.\"
5.\" @(#)@(#)ualarm.3 6.4 (Berkeley) %G%
6.\"
7.TH UALARM 3 ""
8.UC 6
9.SH NAME
10ualarm \- schedule signal after specified time
11.SH SYNOPSIS
12.nf
13.B unsigned ualarm(value, interval)
14.B unsigned value;
15.B unsigned interval;
16.fi
17.SH DESCRIPTION
18.ft B
19This is a simplified interface to setitimer(2).
20.ft R
21.PP
22.I Ualarm
23causes signal SIGALRM, see
24.IR signal (3C),
25to be sent to the invoking process
26in a number of microseconds given by the
27.I value
28argument.
29Unless caught or ignored, the signal terminates the process.
30.PP
31If the
32.I interval
33argument is non-zero, the SIGALRM signal will be sent
34to the process every
35.I interval
36microseconds after the timer expires (e.g. after
37.I value
38microseconds have passed).
39.PP
40Because of scheduling delays,
41resumption of execution of when the signal is
42caught may be delayed an arbitrary amount.
43The longest specifiable delay time (on the vax) is 2147483647 microseconds.
44.PP
45The return value is the amount of time previously remaining in the alarm clock.
46.SH "SEE ALSO"
47getitimer(2), setitimer(2), sigpause(2), sigvec(2), signal(3C), sleep(3),
48alarm(3), usleep(3)