//! Small time helpers shared by the transport and server layers.
use Duration;
/// Whole milliseconds in `duration`, saturating at `u64::MAX`.
///
/// `Duration::as_millis` returns `u128`; a bare `as u64` cast would wrap for
/// absurd durations and turn a long backoff into a short one.