mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-27 00:00:12 +02:00
time: add getter for Interval's period (#3705)
This commit is contained in:
@@ -176,4 +176,9 @@ impl Interval {
|
|||||||
// Return the current instant
|
// Return the current instant
|
||||||
Poll::Ready(now)
|
Poll::Ready(now)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns the period of the interval.
|
||||||
|
pub fn period(&self) -> Duration {
|
||||||
|
self.period
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user