ualarm(S)
ualarm --
set the interval timer
Synopsis
cc. . .-lc
#include <unistd.h>
useconds_t ualarm(useconds_t useconds, useconds_t interval);
Description
The ualarm function causes the SIGALRM signal to
be generated for the calling process after the number of real-time
microseconds specified by the useconds argument has elapsed.
When the interval argument is non-zero, repeated timeout
notification occurs with a period in microseconds specified by the
interval argument.
If the notification signal, SIGALRM, is not caught or
ignored, the calling process is terminated.
Because of scheduling delays, resumption of execution of when the signal is
caught may be delayed an arbitrary amount.
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.
Usage
The
ualarm( )
function is a simplified interface to
setitimer(S)
and uses the ITIMER_REAL interval timer.
In SCO OpenServer Release 5.0.6,
ITIMER_REAL has 10ms accuracy.
In some future release,
setitimer( )
(and, by extension,
ularm( ))
will be rewritten to use the
high-precision system clock documented on the
clock(HW)
manual page.
See also
alarm(S),
getitimer(S),
signal(S),
sigpause(S),
sleep(S),
usleep(S)
Standards conformance
This routine conforms to X/Open System Interfaces and Headers,
Issue 4, Version 2.
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003