| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Modern Unixes tend to implement alarms using the setitimer()
function, which has a higher resolution and more options than the simple
alarm() function. One should generally assume that alarm()
and setitimer(ITIMER_REAL) may be the same underlying timer, and
accessing it both ways may cause confusion.
Itimers can be used to implement either one-shot or repeating signals; also, there are generally 3 separate timers available:
ITIMER_REALcounts real (wall clock) time, and sends the SIGALRM signal
ITIMER_VIRTUALcounts process virtual (user CPU) time, and sends the SIGVTALRM
signal
ITIMER_PROFcounts user and system CPU time, and sends the SIGPROF signal;
it is intended for interpreters to use for profiling.
Itimers, however, are not part of many of the standards, despite having been present since 4.2BSD. The POSIX realtime extensions define some similar, but different, functions.
| [ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] |
This document was generated on September, 10 2007 using texi2html 1.77.