]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Update docstring 3025/head
authorMichael V. DePalatis <mike@depalatis.net>
Wed, 5 May 2021 15:55:24 +0000 (09:55 -0600)
committerMichael V. DePalatis <mike@depalatis.net>
Wed, 5 May 2021 15:55:24 +0000 (09:55 -0600)
tornado/ioloop.py

index fff29cefb148792f27a976cde7d568249022884b..2b0ac019fa0c930bb9296206a23286197bcb3087 100644 (file)
@@ -839,9 +839,11 @@ class _Timeout(object):
 class PeriodicCallback(object):
     """Schedules the given callback to be called periodically.
 
-    The callback is called every ``callback_time`` milliseconds.
-    Note that the timeout is given in milliseconds, while most other
-    time-related functions in Tornado use seconds.
+    The callback is called every ``callback_time`` milliseconds when
+    ``callback_time`` is a float. Note that the timeout is given in
+    milliseconds, while most other time-related functions in Tornado use
+    seconds. ``callback_time`` may alternatively be given as a
+    `datetime.timedelta` object.
 
     If ``jitter`` is specified, each callback time will be randomly selected
     within a window of ``jitter * callback_time`` milliseconds.