Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

ualarm - set interval timer

&pagelevel(4)&pagelevel

Syntax

#include <unistd.h>

useconds_t ualarm(useconds_t useconds, useconds_t interval)

Description

ualarm() sends the SIGALRM signal to the calling process after useconds microseconds.
Unless it is ignored or caught, the signal terminates the process.

If the interval argument is not zero, the SIGALRM signal will be sent to the process every
interval microseconds after expiry of the timer (e.g. after useconds microseconds have
elapsed).

Because of delays in the scheduling, the resumption of execution after the signal is caught
can be delayed. The longest delay time that can be specified is 2.147.483.647
microseconds.

Return val.

The return value is the time remaining until the alarm signal is output.

Notes

ualarm() is a simplified interface for setitimer().

See also

alarm(), setitimer(), sleep(), unistd.h.