Poll#
- class ignis.utils.Poll(timeout: int, callback: Callable, *args)#
Calls a callback every n milliseconds specified by the timeout.
You can pass arguments to the constructor, and they will be passed to the callback.
Example usage:
from ignis.utils import Utils # print "Hello" every second Utils.Poll(timeout=1_000, callback=lambda self: print("Hello"))
- changed()#
Signal
Emitted at each iteration.
- property callback: Callable#
required, read-write
The function to call when the timeout is reached. The
self
will passed as an argument.