diff --git a/src/timings.rs b/src/timings.rs index f4b2b434..8a29a6ef 100644 --- a/src/timings.rs +++ b/src/timings.rs @@ -180,7 +180,10 @@ pub struct NextTimeout { } impl NextTimeout { - pub(crate) fn not_zero(&self) -> Option { + /// Returns the duration of the timeout if the timeout must happen, but avoid instant timeouts + /// + /// If the timeout must happen but is zero, returns 1 second + pub fn not_zero(&self) -> Option { if self.after.is_not_happening() { None } else if self.after.is_zero() {