|UALARM(3)||Linux Programmer's Manual||UALARM(3)|
useconds_t ualarm(useconds_t usecs, useconds_t interval);
Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
- Since glibc 2.12:
(_XOPEN_SOURCE >= 500) && ! (_POSIX_C_SOURCE >= 200809L) || /* Glibc since 2.19: */ _DEFAULT_SOURCE || /* Glibc versions <= 2.19: */ _BSD_SOURCE
Before glibc 2.12:
- _BSD_SOURCE || _XOPEN_SOURCE >= 500
Unless caught or ignored, the SIGALRM signal will terminate the process.
If the interval argument is nonzero, further SIGALRM signals will be sent every interval microseconds after the first.
- Interrupted by a signal; see signal(7).
- usecs or interval is not smaller than 1000000. (On systems where that is considered an error.)
|ualarm ()||Thread safety||MT-Safe|
The type useconds_t is an unsigned integer type capable of holding integers in the range [0,1000000]. On the original BSD implementation, and in glibc before version 2.1, the arguments to ualarm() were instead typed as unsigned int. Programs will be more portable if they never mention useconds_t explicitly.
The interaction of this function with other timer functions such as alarm(2), sleep(3), nanosleep(2), setitimer(2), timer_create(2), timer_delete(2), timer_getoverrun(2), timer_gettime(2), timer_settime(2), usleep(3) is unspecified.