Skip to main content

time_from_now_secs

Function time_from_now_secs 

Source
pub fn time_from_now_secs(range: Range<u64>) -> SystemTime
Expand description

Adds a random whole-second offset to the current SystemTime.

The offset is sampled from the supplied half-open range. The function panics if the range is invalid or the addition exceeds SystemTime.