Module-level declarations

Simple module to support delayed events by adding an event entity and then extend and listen to the callback.

Types

Link copied to clipboard
Link copied to clipboard

Deprecated entity, replaced by scheduled_callback. Remove once migrated.

Link copied to clipboard

Each entity represents a scheduled event to be triggered at a specific time. It is however not part of the delay implementation, but used to keep the time and later turn it into a delayed event.

Functions

Link copied to clipboard
function add_scheduled_event(delay_type: delay_type, ref_id: integer, scheduled_at: integer)

Store information about a scheduled event. This will not execute it on time, just store it.

Link copied to clipboard
function delete_scheduled_event(delay_type: delay_type, ref_id: integer)
Link copied to clipboard
function get_scheduled_event_delay(delay_type: delay_type, ref_id: integer): integer?

Get the approximately time (delay) from "now" (last block time) to the scheduled_at time.

Link copied to clipboard
function get_scheduled_event_time(delay_type: delay_type, ref_id: integer): integer?