momento v0.1.2 Momento.Helpers
This module holds all the various herlper methods, floor/1
, millisecond_factor/1
and microsecond_factor/1
.
Summary
Functions
Helper to get the floor of a float
in the form of an integer
Helper to get the factor needed to get microseconds from a given precision
Helper to get the factor needed to get milliseconds from a given precision
Functions
Specs
floor(float) :: integer
Helper to get the floor of a float
in the form of an integer
.
Examples
iex> Momento.Helpers.floor(5.22)
5
Specs
microsecond_factor(integer) :: integer
Helper to get the factor needed to get microseconds from a given precision.
Examples
iex> Momento.Helpers.microsecond_factor(6)
1000000