time: Update examples, tests, and other code to use new Timer::after_x convenience methods
This commit is contained in:
@ -6,7 +6,7 @@ use defmt::info;
|
||||
use embassy_executor::Spawner;
|
||||
use embassy_nrf::pdm::{self, Config, Pdm};
|
||||
use embassy_nrf::{bind_interrupts, peripherals};
|
||||
use embassy_time::{Duration, Timer};
|
||||
use embassy_time::Timer;
|
||||
use fixed::types::I7F1;
|
||||
use num_integer::Roots;
|
||||
use {defmt_rtt as _, panic_probe as _};
|
||||
@ -28,7 +28,7 @@ async fn main(_p: Spawner) {
|
||||
pdm.start().await;
|
||||
|
||||
// wait some time till the microphon settled
|
||||
Timer::after(Duration::from_millis(1000)).await;
|
||||
Timer::after_millis(1000).await;
|
||||
|
||||
const SAMPLES: usize = 2048;
|
||||
let mut buf = [0i16; SAMPLES];
|
||||
@ -51,7 +51,7 @@ async fn main(_p: Spawner) {
|
||||
info!("samples: {:?}", &buf);
|
||||
|
||||
pdm.stop().await;
|
||||
Timer::after(Duration::from_millis(100)).await;
|
||||
Timer::after_millis(100).await;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user