mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-19 00:00:09 +02:00
time: fix example for MissedTickBehavior::Burst (#4713)
This commit is contained in:
@@ -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
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user