Releases: Mnwa/ms
Releases · Mnwa/ms
Converting milliseconds into Duration
Features
- Now you can convert
str
slice intotime.Duration
!
Example
use crate::ms_converter::ms_into_time;
let value = ms_into_time("1d").unwrap();
assert_eq!(value.as_millis(), 86400000)
Converting time without any runtime overhead
Features
crate::ms_converter::ms_expr
macro, now you can convert time into constants and calculate values in a compilation.
Example:
use crate::ms_converter::ms_expr;
const VALUE: i64 = ms_expr!(i64, 1 d);
assert_eq!(VALUE, 86400000)
Inline ms function
Now ms function will be inlined, which will save 3-4ns on benches
Change ms signature
Breaking changes
- Now
ms
library returned i64 type
Update home page in crates io
0.4.2 Update homepage
Update docs
0.4.1 Add doc
Remove benches to use lib on stable release channel
0.4.0 Update version
Remove any deps and increase ms perfomans
Increased perf from 436 ns/iter to 4 ns/iter
Optimisation release, change function signature
#Breaking changes
Now you must pass &str
to ms function
First release
0.1.0 Update doc