libgs.utils.RegularCallback

class libgs.utils.RegularCallback(func, delay, min_interval=0.05)[source]

Invokes a callback at regular intervals.

Example:

>>> def callback():
>>>    print("Called callback")
>>> rb = RegularCallback(callback, 5)
>>> rb.start()
Parameters:
  • func – Callback funciton to call
  • delay – Time between two subsequent calls
  • min_interval – Minimum time between the end of one call and the beginning of th next

Methods

start() Start the regular callback
stop() Stop the regular callback

Inherited from base class