signal.setitimer(which, seconds[, interval])
Sets given interval timer (one of signal.ITIMER_REAL
, signal.ITIMER_VIRTUAL
or signal.ITIMER_PROF
) specified by which to fire after seconds (float is accepted, different from alarm()
) and after that every interval seconds. The interval timer specified by which can be cleared by setting seconds to zero.
When an interval timer fires, a signal is sent to the process. The signal sent is dependent on the timer being used; signal.ITIMER_REAL
will deliver SIGALRM
, signal.ITIMER_VIRTUAL
sends SIGVTALRM
, and signal.ITIMER_PROF
will deliver SIGPROF
.
The old values are returned as a tuple: (delay, interval).
Attempting to pass an invalid interval timer will cause an ItimerError
. Availability: Unix.
Please login to continue.