Expand description
§Duration Flex
Helper class to make it easier to specify duration files. Specially useful in configuration files.
- Basic interoperability with
chrono::DateTime
, allowing it to be added/subbed from it. - Can be built from
chrono::Duration
. - Can be built from
std::time::Duration
.
Example:
- 1 hour and 23 minutes:
1h23m
- 1 week, 6 days, 23 hours, 49 minutes andd 50 seconds:
1w6d23h49m59s
Supported Time Units
- Weeks:
2w
(2 weeks). - Days:
3d
(3 days). - Hours:
15h
(15 hours). - Minutes:
5m
(5 minutes). - Seconds:
30s
(30 seconds).
§Features
clap
: enable clap support, so it can be used as application arguments.serde
: enable serde support.
Structs§
- Type to conveniently specify durations and interoperate with
chrono::Duration
.