bpo-30807: signal.setitimer() now uses _PyTime API (GH-3865)
The _PyTime API handles detects overflow and is well tested.
Document that the signal will only be sent once if internal is equal
to zero.
diff --git a/Doc/library/signal.rst b/Doc/library/signal.rst
index 46d71de..2bc39d9 100644
--- a/Doc/library/signal.rst
+++ b/Doc/library/signal.rst
@@ -273,13 +273,14 @@
.. versionadded:: 3.3
-.. function:: setitimer(which, seconds[, interval])
+.. function:: setitimer(which, seconds, interval=0.0)
Sets given interval timer (one of :const:`signal.ITIMER_REAL`,
:const:`signal.ITIMER_VIRTUAL` or :const:`signal.ITIMER_PROF`) specified
by *which* to fire after *seconds* (float is accepted, different from
- :func:`alarm`) and after that every *interval* seconds. The interval
- timer specified by *which* can be cleared by setting seconds to zero.
+ :func:`alarm`) and after that every *interval* seconds (if *interval*
+ is non-zero). 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;