ualarm(S-osr5)
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-osr5)
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-osr5),
getitimer(S-osr5),
signal(S-osr5),
sigpause(S-osr5),
sleep(S-osr5),
usleep(S-osr5)
Standards conformance
This routine conforms to X/Open System Interfaces and Headers,
Issue 4, Version 2.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005