Timers
- class pyrbs.timers.timer.Timer(_rbs, name, time_to_elapse, execution_count=0, active_on_start=False)
Bases:
Callbacktimer event
- Parameters:
_rbs (PyRbs)
name (str) – name of the timer
time_to_elapse (float) – duration of the timer
execution_count (int, optional) – 0 = endles repetition. 1 = 1x execution 2 = 2x… Defaults to 0.
active_on_start (bool, optional) – timer starts running at “on_start” event. Defaults to False.
- name: str
- execution_count: int
- active_on_start: bool
- property time_to_elapse: float
The time a timer has to run until it expires
- property elapsed: float
The time elapsed on a running timer
- property active: bool
Indication if Timer is active running right now
- property count: int
The count of completed elapsed cycles the value can be reset to any number
- start()
- Return type:
None
- stop()
- Return type:
None
- reset()
- Return type:
None