diff --git a/src/select.rs b/src/select.rs index 8433d96..334ad2c 100644 --- a/src/select.rs +++ b/src/select.rs @@ -389,7 +389,7 @@ impl<'a, T> Selector<'a, T> { /// `eventual-fairness` feature flag is enabled, this method is fair and will handle a random event of those that /// are ready. pub fn wait_timeout(self, dur: Duration) -> Result { - self.wait_inner(Some(Instant::now() + dur)) + self.wait_inner(Instant::now().checked_add(dur)) .ok_or(SelectError::Timeout) }