#include <unistd.h> useconds_t ualarm( useconds_t useconds, useconds_t interval );
This call always succeeds.
If there was a previous ualarm()
request with time remaining,
then this routine returns the number of seconds until that outstanding
alarm would have fired. If no previous alarm()
request was
outstanding, then zero is returned.
The ualarm()
service causes the SIGALRM
signal to
be generated after the number of microseconds specified by
useconds
has elapsed.
When interval
is non-zero, repeated timeout notification occurs
with a period in microseconds specified by interval
.
Alarm requests do not queue. If alarm
is called while
a previous request is outstanding, the call will result in
rescheduling the time at which the SIGALRM
signal
will be generated.
If the notification signal, SIGALRM
, is not caught or ignored, the
calling process is terminated.
Copyright © 1988-2008 OAR Corporation