diff --git a/tokio/src/time/interval.rs b/tokio/src/time/interval.rs index 20cfceccce3..4b1c6f6dfda 100644 --- a/tokio/src/time/interval.rs +++ b/tokio/src/time/interval.rs @@ -176,4 +176,9 @@ impl Interval { // Return the current instant Poll::Ready(now) } + + /// Returns the period of the interval. + pub fn period(&self) -> Duration { + self.period + } }