Bases: efl.eo.Eo
Creates a timer to call the given function in the given period of time.
This class represents a timer that will call the given func every interval seconds. The function will be passed any extra parameters given to constructor.
When the timer func is called, it must return a value of either True or False (remember that Python returns None if no value is explicitly returned and None evaluates to False). If it returns True, it will be called again at the next interval, or if it returns False it will be deleted automatically making any references/handles for it invalid.
Timers should be stopped/deleted by means of delete() or returning False from func, otherwise they’ll continue alive, even if the current python context delete it’s reference to it.
Parameters: |
|
---|
Expected func signature:
func(*args, **kargs): bool
Delay the execution of the timer by the given amount
Parameters: | add (double) – seconds to add to the timer |
---|
New in version 1.8.
Stop callback emission and free internal resources.
Pauses a running timer.
The interval (in seconds) between each call of the timer
Type: | double |
---|
The pending time for the timer to expire
Type: | double |
---|
New in version 1.8.
Reset the counter of the timer
New in version 1.8.
Alias for delete()
Resumes a frozen (paused) timer.