[][src]Crate ms_converter

Fast converter various time formats into milliseconds.

Macros

ms_expr

Zero cost converter from human-like time into a number. In the first argument, you need to pass type of your number (i64, f64 and etc). The second argument is human-time construction, like 1 day, 2 h. The output will be a number with type what you set in the first argument.

Structs

Error

Constants

DAY
HOUR
MINUTE
SECOND
WEEK
YEAR

Functions

ms

Fast abstraction for converting human-like times into milliseconds. ms function gets an str slice and returns how much milliseconds in your pattern.

ms_into_time

Ms into time is the abstraction on ms function, which converts result into time.Duration type. ms_into_time function gets an str slice and returns time.Duration. ms_into_time has some limitations, it's not working with negative values: