ualarm(3C)


ualarm -- set the interval timer

Synopsis

   #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 (see getitimer(3C)), and uses the ITIMER_REAL interval timer.

References

alarm(2), getitimer(3C), signal(3bsd), sigpause(3bsd), sigvec(3bsd), sleep(3bsd), usleep(3bsd)

Standards conformance

These routines conform to X/Open System Interfaces and Headers, Issue 4, Version 2.
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004