time: Update examples, tests, and other code to use new Timer::after_x convenience methods

This commit is contained in:
Adam Greig
2023-10-15 00:57:25 +01:00
parent 7559f9e583
commit 0621e957a0
174 changed files with 496 additions and 501 deletions

View File

@ -9,7 +9,7 @@ use embassy_stm32::rcc::{ClockSrc, LsConfig, PLLSource, PllMul, PllPreDiv, PllRD
use embassy_stm32::rtc::{Rtc, RtcConfig};
use embassy_stm32::time::Hertz;
use embassy_stm32::Config;
use embassy_time::{Duration, Timer};
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
#[embassy_executor::main]
@ -39,7 +39,7 @@ async fn main(_spawner: Spawner) {
rtc.set_datetime(now.into()).expect("datetime not set");
// In reality the delay would be much longer
Timer::after(Duration::from_millis(20000)).await;
Timer::after_millis(20000).await;
let then: NaiveDateTime = rtc.now().unwrap().into();
info!("Got RTC! {:?}", then.timestamp());