Durex

Documentation

A small Elixir library for parsing durations, such as "1s", to its numerical millisecond value, e.g. 1_000.

Installation

def deps do
[
{:durex, "~> 0.1.0"}
]
end

Usage

# Success
{:ok, 1_000} = Durex.parse("1s")
{:ok, 500} = Durex.parse("0.5s")
# Error
:error = Durex.parse("bla")

MIT License

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at