time: fix example for MissedTickBehavior::Burst (#4713)

This commit is contained in:
Eric Zhang 2022-05-22 15:22:03 -04:00 committed by GitHub
parent 9f4959580f
commit 323b63fa04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
///