Tagtime
Implementation of the TagTime universal ping schedule in Elixir.
Usage
t = System.system_time(:second)
# Initialize RNG state and last ping, which we will need for the next ping
{state, ping_before_t} = Tagtime.init(t)
# next_ping/2 with these params now returns the first ping >= t in unix time
{state, ping} = Tagtime.next_ping(state, ping_before_t)Installation
Add tagtime to your list of dependencies in mix.exs:
def deps do
[
{:tagtime, "~> 0.1.0"}
]
endThe docs can be found at https://hexdocs.pm/tagtime.