pub fn millis(duration: Duration) -> Option<u64>
Converts a duration to whole milliseconds when they fit in a u64.
u64
The submillisecond remainder is discarded; a count past u64::MAX gives None rather than truncating.
u64::MAX
None