momento v0.1.1 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

floor(float)

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
microsecond_factor(precision)

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
millisecond_factor(precision)

Specs

millisecond_factor(integer) :: integer

Helper to get the factor needed to get milliseconds from a given precision.

Examples

iex> Momento.Helpers.millisecond_factor(6)
1000