DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

ualarm(S)


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(S)), and uses the ITIMER_REAL interval timer.

References

alarm(S), getitimer(S), signal(S), sigpause(S), sigvec(S), sleep(S), usleep(S)

Standards conformance

These routines conform 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 - 01 June 2005