PyDocs

Nav

Concurrent Execution

Timer

threading

class (source) not WASI
  • Timer(interval, function, args=None, kwargs=None)
Call a function after a specified number of seconds:

t = Timer(30.0, f, args=None, kwargs=None)
t.start()
t.cancel()     # stop the timer's action if it's still waiting
Changed in 3.3
  • 3.3: changed from a factory function to a class.
Members of Timer

c

cancel
Stop the timer if it hasn't finished yet.
0 Examples
No examples for threading/Timer.
See Also
No see-alsos for threading/Timer
0 Notes
No notes for Timer