@@ -26,9 +26,9 @@ async fn work_forever(mut args: args::Options) -> Result {
2626 let mut sp = progress. add_child ( "preparation" ) ;
2727 sp. info ( "warming up" ) ;
2828 smol:: Task :: spawn ( async move {
29- async_io:: Timer :: new ( Duration :: from_millis ( 500 ) ) . await ;
29+ async_io:: Timer :: after ( Duration :: from_millis ( 500 ) ) . await ;
3030 sp. fail ( "engine failure" ) ;
31- async_io:: Timer :: new ( Duration :: from_millis ( 750 ) ) . await ;
31+ async_io:: Timer :: after ( Duration :: from_millis ( 750 ) ) . await ;
3232 sp. done ( "warmup complete" ) ;
3333 } )
3434 . detach ( ) ;
@@ -139,7 +139,7 @@ async fn work_item(mut progress: Item, speed: f32, changing_names: bool) {
139139 if thread_rng ( ) . gen_bool ( if changing_names { 0.5 } else { 0.01 } ) {
140140 progress. set_name ( WORK_NAMES . choose ( & mut thread_rng ( ) ) . unwrap ( ) . to_string ( ) ) ;
141141 }
142- async_io:: Timer :: new ( Duration :: from_millis ( ( delay_ms as f32 / speed) as u64 ) ) . await ;
142+ async_io:: Timer :: after ( Duration :: from_millis ( ( delay_ms as f32 / speed) as u64 ) ) . await ;
143143 }
144144 if thread_rng ( ) . gen_bool ( 0.95 ) {
145145 progress. done ( * DONE_MESSAGES . choose ( & mut thread_rng ( ) ) . unwrap ( ) ) ;
@@ -165,7 +165,7 @@ async fn new_chunk_of_work(max: NestingLevel, tree: Tree, speed: f32, changing_n
165165 ) ) ;
166166 handles. push ( handle) ;
167167
168- async_io:: Timer :: new ( Duration :: from_millis ( ( SPAWN_DELAY_MS as f32 / speed) as u64 ) ) . await ;
168+ async_io:: Timer :: after ( Duration :: from_millis ( ( SPAWN_DELAY_MS as f32 / speed) as u64 ) ) . await ;
169169 }
170170 if level + 1 != max_level {
171171 let tmp = level_progress. add_child ( format ! ( "Level {}" , level + 1 ) ) ;
0 commit comments