time: Update examples, tests, and other code to use new Timer::after_x convenience methods
This commit is contained in:
@ -100,7 +100,7 @@ async fn main_task(spawner: Spawner) {
|
||||
return;
|
||||
}
|
||||
|
||||
Timer::after(Duration::from_millis(500)).await;
|
||||
Timer::after_millis(500).await;
|
||||
}
|
||||
info!("Closing the connection");
|
||||
socket.abort();
|
||||
|
@ -1,14 +1,14 @@
|
||||
#![feature(type_alias_impl_trait)]
|
||||
|
||||
use embassy_executor::Spawner;
|
||||
use embassy_time::{Duration, Timer};
|
||||
use embassy_time::Timer;
|
||||
use log::*;
|
||||
|
||||
#[embassy_executor::task]
|
||||
async fn run() {
|
||||
loop {
|
||||
info!("tick");
|
||||
Timer::after(Duration::from_secs(1)).await;
|
||||
Timer::after_secs(1).await;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user