Jackalope.WorkList.Expiration (jackalope v0.7.2) View Source

Common functions for work lists.

Link to this section Summary

Functions

Does the first expiration come after the second?

Recalculate an old expiration given the latest time before stop and the earliest time after restart. Assumes restart happened soon after stopping.

Link to this section Types

Specs

expiration() :: non_neg_integer() | :infinity

Link to this section Functions

Specs

after?(expiration(), expiration()) :: boolean()

Does the first expiration come after the second?

Specs

expiration(non_neg_integer() | :infinity) :: expiration()

Specs

now() :: integer()
Link to this function

rebase_expiration(exp, stop_time, restart_time)

View Source

Specs

rebase_expiration(expiration(), integer(), integer()) :: expiration()

Recalculate an old expiration given the latest time before stop and the earliest time after restart. Assumes restart happened soon after stopping.

Link to this function

unexpired?(item, expiration_fn)

View Source

Specs

unexpired?(any(), (any() -> expiration())) :: boolean()