Skip to content

Commit

Permalink
time: fix example for MissedTickBehavior::Burst (#4713)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekzhang committed May 22, 2022
1 parent 9f49595 commit 323b63f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tokio/src/time/interval.rs
Expand Up @@ -207,6 +207,9 @@ pub enum MissedTickBehavior {
/// # async fn main() {
/// let mut interval = interval(Duration::from_millis(50));
///
/// // First tick resolves immediately after creation
/// interval.tick().await;
///
/// task_that_takes_200_millis().await;
/// // The `Interval` has missed a tick
///
Expand Down

0 comments on commit 323b63f

Please sign in to comment.