timer_thread

Background thread that sends an event after the specified interval.

Useful for timeouts or updating timers, clocks etc.

Classes:

Timer(parent[, interval])

Background Timer Class.

Data:

timer_event

An instance of domdf_python_tools.events.SimpleEvent called Timer.

class Timer(parent, interval=1.0)[source]

Bases: Thread

Background Timer Class.

Parameters
  • parent (Window) – Class to send event updates to.

  • interval (float) – Interval to trigger events at, in seconds. Default 1.0.

Methods:

join([timeout])

Stop the thread and wait for it to end.

run()

Run the timer thread.

join(timeout=None)[source]

Stop the thread and wait for it to end.

Parameters

timeout – Default None.

run()[source]

Run the timer thread.

timer_event = SimpleEvent(name=Timer)

Type:    SimpleEvent

An instance of domdf_python_tools.events.SimpleEvent called Timer.

This event is triggered when the timer has expired.