Expand description
Duration parsing for --timeout 30s, --older-than 30d, etc.
Delegates to humantime for the wire format and converts to
std::time::Duration. Keeps a single error type (InvalidArgument) so
every flag that takes a duration produces the same shape on bad input.
Functions§
- duration_
ms - Convert a
Durationto milliseconds, saturating on overflow. Used by*_msfields in the protocol output. - parse_
duration - Parse a human-readable duration (
30s,250ms,1m,30d) into astd::time::Duration. Empty or unparseable input returnsErrorCode::InvalidArgument.