GObj for generate timeout events.
Supply timer events.
Broadcast the timeout_event_name event when the seconds time has elapsed.
If autostart is True, the timer is cyclic.
Name | Type | Default value | Description |
---|---|---|---|
subscriber | None | None | subcriber of all output-events. Default is None, i.e., the parent |
seconds | int | -1 | timeout in seconds. With seconds=-1 the current timer is cancelled |
timeout_event_name | str | EV_TIMEOUT | Timeout event name |
autostart | bool | False | If True then timeout event is repeated every seconds |
Input-Events:
- 'EV_SET_TIMER': Set the timer.
Broadcast the 'EV_TIMEOUT' or timeout_event_name event when the seconds time has elapsed.
If autostart is true, the timer is cyclic.
Associated data to event:
- seconds: seconds of timer.
- autostart: cyclic timer.
With seconds=-1 the current timer is cancelled.
Output-Events:
- 'EV_TIMEOUT': Timer over.
Send the 'EV_TIMEOUT' or timeout_event_name event to subscribers.