chaperon v0.2.3 Chaperon.Timing View Source

Timing related helper functions and type definitions used within Chaperon.

Link to this section Summary

Functions

Returns the correct amount of milliseconds for a given amount of days

Returns the correct amount of milliseconds for a given amount of hours

Returns the correct amount of milliseconds for a given amount of minutes

Returns the correct amount of milliseconds for a given amount of seconds

Returns a timestamp with the given time unit

Returns the correct amount of milliseconds for a given amount of weeks

Link to this section Types

Link to this type duration() View Source
duration() :: duration_number() | {:random, duration_number()}
Link to this type duration_number() View Source
duration_number() :: non_neg_integer() | float() | Range.t()
Link to this type time_unit() View Source
time_unit() :: :seconds | :milli_seconds | :micro_seconds | :nano_seconds

Link to this section Functions

Returns the correct amount of milliseconds for a given amount of days.

Returns the correct amount of milliseconds for a given amount of hours.

Returns the correct amount of milliseconds for a given amount of minutes.

Returns the correct amount of milliseconds for a given amount of seconds.

Link to this function timestamp(unit \\ :milli_seconds) View Source
timestamp(time_unit()) :: non_neg_integer()

Returns a timestamp with the given time unit.

Returns the correct amount of milliseconds for a given amount of weeks.