Timed events documentation¶
Timed events are the standard way to schedule events for later in poezio.
Once created, they must be added to the list of checked events with
Core.add_timed_event()
(within poezio) or with
PluginAPI.add_timed_event()
(within a plugin).
-
class
poezio.timed_events.
TimedEvent
(date: datetime.datetime, callback: Callable, *args)[source]¶ An event with a callback that is called when the specified time is passed.
The callback and its arguments should be passed as the lasts arguments.
-
__init__
(date: datetime.datetime, callback: Callable, *args) → None[source]¶ Create a new timed event.
Parameters: - date (datetime.datetime) -- Time at which the callback must be run.
- callback (function) -- The handler that will be executed.
- args -- Optional arguments passed to the handler.
-