time_queue v0.1.0 TimeQueue

Link to this section Summary

Link to this section Types

Link to this opaque

entry()

(opaque)
entry()
Link to this opaque

t()

(opaque)
t()
Link to this type

time_unit()

time_unit() ::
  :ms
  | :second
  | :seconds
  | :minute
  | :minutes
  | :hour
  | :hours
  | :day
  | :days
  | :week
  | :weeks
Link to this opaque

tref()

(opaque)
tref()

Link to this section Functions

Link to this function

delete(tq, entry)

delete(t(), entry()) :: t()
Link to this function

enqueue(tq, ttl, val, now \\ system_time())

enqueue(t(), ttl(), any(), now :: integer()) :: {:ok, tref(), t()}
Link to this function

enqueue_abs(tq, ts, val)

Link to this macro

is_ttl(ttl)

(macro)
Link to this function

new()

new() :: {:ok, t()}
Link to this function

peek(tq, now \\ system_time())

peek(t(), now_ms :: integer()) ::
  :empty | {:delay, non_neg_integer()} | {:ok, entry()}
Link to this function

pop(tq, now \\ system_time())

Link to this macro

trec(args \\ [])

(macro)
Link to this macro

trec(record, args)

(macro)
Link to this function

ttl_to_milliseconds(ttl)

ttl_to_milliseconds(ttl()) :: number()
Link to this function

value(arg)

value(entry()) :: any()