Crate systemd_duration

Source
Expand description

systemd-duration is a library that parses systemd-style durations.

It can parse durations into the following formats:

It uses the nom library to parse durations.

§Example

let td = systemd_duration::stdtime::parse("1d3s").expect("Could not parse duration");
assert_eq!(td, std::time::Duration::from_secs(86_403));

Modules§

chrono
duration
error
parser
stdtime
time