@@ -832,17 +832,17 @@ Timer Objects
832
832
-------------
833
833
834
834
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 `
838
838
and as such also functions as an example of creating custom threads.
839
839
840
840
Timers are started, as with threads, by calling their :meth: `~Timer.start `
841
841
method. The timer can be stopped (before its action has begun) by calling the
842
842
:meth: `~Timer.cancel ` method. If action has returned True then next run is
843
843
scheduled after the timer interval. The interval the timer will wait before
844
844
executing its action may not be exactly the same as the interval specified
845
- by the user.
845
+ by the user.
846
846
847
847
848
848
For example::
@@ -858,14 +858,12 @@ For example::
858
858
t = Timer(1.0, star)
859
859
t.start() # it prints five "*" with 1 sec waiting between prints
860
860
861
-
862
-
863
861
864
862
.. class :: Timer(interval, function, args=None, kwargs=None)
865
863
866
864
Create a timer that will run *function * with arguments *args * and keyword
867
865
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.
869
867
If *args * is ``None `` (the default) then an empty list will be used.
870
868
If *kwargs * is ``None `` (the default) then an empty dict will be used.
871
869
0 commit comments