Skip to content

Commit e25ab6a

Browse files
committed
fix docs
1 parent 178568b commit e25ab6a

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Doc/library/threading.rst

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -832,17 +832,17 @@ Timer Objects
832832
-------------
833833

834834
This class represents an action that should be run after a certain amount
835-
of time has passed --- a timer. It also can run periodically: each run happens
836-
after specified time that passed since previous run until the action returns True.
837-
:class:`Timer` is a subclass of :class:`Thread`
835+
of time has passed --- a timer. It also can run periodically. Each run takes
836+
place after a specified time after the previous run. This continues until
837+
the action returns TRUE. :class:`Timer` is a subclass of :class:`Thread`
838838
and as such also functions as an example of creating custom threads.
839839

840840
Timers are started, as with threads, by calling their :meth:`~Timer.start`
841841
method. The timer can be stopped (before its action has begun) by calling the
842842
:meth:`~Timer.cancel` method. If action has returned True then next run is
843843
scheduled after the timer interval. The interval the timer will wait before
844844
executing its action may not be exactly the same as the interval specified
845-
by the user.
845+
by the user.
846846

847847

848848
For example::
@@ -858,14 +858,12 @@ For example::
858858
t = Timer(1.0, star)
859859
t.start() # it prints five "*" with 1 sec waiting between prints
860860

861-
862-
863861

864862
.. class:: Timer(interval, function, args=None, kwargs=None)
865863

866864
Create a timer that will run *function* with arguments *args* and keyword
867865
arguments *kwargs*, after *interval* seconds have passed and continues
868-
periodically run *function* until *function* returns True.
866+
periodically run *function* till *function* returns True.
869867
If *args* is ``None`` (the default) then an empty list will be used.
870868
If *kwargs* is ``None`` (the default) then an empty dict will be used.
871869

0 commit comments

Comments
 (0)