mogs v0.1.1 Mogs.Timers

Link to this section Summary

Functions

Returns an empty timers structure to initialize timers in a board. This structure will contain the timers that commands may set on the board.

Link to this section Types

Link to this type

enqueue_return()

enqueue_return() :: TimeQueue.enqueue_return(board())
Link to this type

pop_return()

pop_return() :: TimeQueue.pop_return(board())
Link to this type

timer()

timer() :: term()

Link to this section Functions

Link to this function

enqueue_timer(board, ttl, value, now \\ TimeQueue.now())

enqueue_timer(board(), ttl(), value :: any(), now :: integer()) ::
  enqueue_return()
Link to this function

new()

new() :: t()

Returns an empty timers structure to initialize timers in a board. This structure will contain the timers that commands may set on the board.

The timers (implemented by the TimeQueue module) can be serialized (e.g with term_to_binary)

Link to this function

pop_timer(board, now \\ TimeQueue.now())

pop_timer(board(), now :: integer()) :: pop_return()