ualarm(3) (BSD Compatibility Package) ualarm(3)
NAME
ualarm - schedule signal after interval in microseconds
SYNOPSIS
/usr/ucb/cc [flag ...] file ... -lucb
#include <unistd.h>
usecondst ualarm(usecondst useconds, usecondst interval);
DESCRIPTION
ualarm sends signal SIGALRM to the invoking process in a number of
microseconds given by the useconds argument. Unless caught or ignored,
the signal terminates the process.
If the interval argument is non-zero, the SIGALRM signal will be sent
to the process every interval microseconds after the timer expires
(for instance, after useconds microseconds have passed).
Because of scheduling delays, resumption of execution of when the sig-
nal is caught may be delayed an arbitrary amount. The longest specifi-
able delay time is 2.147.483.647 microseconds.
Interactions between ualarm() and either alarm() or sleep() are
unspecified.
RETURN VALUE
The ualarm() function returns the number of microseconds remaining
from the previous ualarm() call. If no timeouts are pending or if
ualarm() has not previously been called, ualarm() returns 0.
NOTES
ualarm is a simplified interface to setitimer(3C), and uses the
ITIMERREAL interval timer.
SEE ALSO
alarm(2), sigpause(3), sigvec(3), usleep(3), signal(3-ucb),
getitimer(3C), sleep(3C-ucb).
Page 1 Reliant UNIX 5.44 Printed 11/98