ITIMER_REAL - This timer decrements in real time. A SIGALRM is delivered when this timer expires.
ITIMER_VIRTUAL - This timer decrements in real time when the calling process is running. Delivers SIGVTALRM when it expires.
ITIMER_PROF - This timer runs when the calling process is running, and when the operating system is operating on behalf of the calling process. A SIGPROF is delivered when the timer expires.
ITIMER_REALPROF - This timer is available under Solaris only. Consult the setitimer(2) manual page for more information.
Interval timers are represented as four item integer lists. The first two integers comprise the second and microsecond parts of the timer's repeat interval. The second pair represent the second and microsecond parts of the current timer value.
The getitimer function expects a single argument naming the timer to fetch. It returns a four element list, or an empty list on failure.
The setitimer function expects a argument naming the timer to set, and a four element list representing the interval. It returns the previous setting of the timer, or an empty list on failure. Setting a timer's repeat interval to 0 will cancel the timer after its next delivery. Setting it's current value to 0 will immediately cancel the timer.