mogs v0.2.0 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
board()
Specs
board() :: Mogs.Timers.Store.t()
Link to this type
enqueue_return()
Specs
enqueue_return() :: TimeQueue.enqueue_return(board())
Link to this type
pop_return()
Specs
pop_return() :: TimeQueue.pop_return(board())
Specs
t() :: TimeQueue.t()
Link to this type
timer()
Specs
timer() :: term()
Link to this type
ttl()
Specs
ttl() :: TimeQueue.ttl()
Link to this section Functions
Link to this function
enqueue_timer(board, ttl, value, now \\ TimeQueue.now())
Specs
enqueue_timer(board(), ttl(), value :: any(), now :: integer()) :: enqueue_return()
Link to this function
new()
Specs
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())
Specs
pop_timer(board(), now :: integer()) :: pop_return()