mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-27 00:00:12 +02:00
time: fix example for MissedTickBehavior::Burst (#4713)
This commit is contained in:
@@ -207,6 +207,9 @@ pub enum MissedTickBehavior {
|
|||||||
/// # async fn main() {
|
/// # async fn main() {
|
||||||
/// let mut interval = interval(Duration::from_millis(50));
|
/// let mut interval = interval(Duration::from_millis(50));
|
||||||
///
|
///
|
||||||
|
/// // First tick resolves immediately after creation
|
||||||
|
/// interval.tick().await;
|
||||||
|
///
|
||||||
/// task_that_takes_200_millis().await;
|
/// task_that_takes_200_millis().await;
|
||||||
/// // The `Interval` has missed a tick
|
/// // The `Interval` has missed a tick
|
||||||
///
|
///
|
||||||
|
|||||||
Reference in New Issue
Block a user