diff --git a/listings/ch17-async-await/listing-17-27/src/main.rs b/listings/ch17-async-await/listing-17-27/src/main.rs index cdab724687..36f4130400 100644 --- a/listings/ch17-async-await/listing-17-27/src/main.rs +++ b/listings/ch17-async-await/listing-17-27/src/main.rs @@ -6,11 +6,11 @@ fn main() { trpl::run(async { // ANCHOR: here let slow = async { - trpl::sleep(Duration::from_millis(100)).await; - "I finished!" + trpl::sleep(Duration::from_secs(5)).await; + "Finally finished" }; - match timeout(slow, Duration::from_millis(10)).await { + match timeout(slow, Duration::from_secs(2)).await { Ok(message) => println!("Succeeded with '{message}'"), Err(duration) => { println!("Failed after {} seconds", duration.as_secs())