aboutsummaryrefslogtreecommitdiff
path: root/examples/stm32wl/src/bin/rtc.rs
diff options
context:
space:
mode:
authorAdam Greig <[email protected]>2023-10-15 00:57:25 +0100
committerAdam Greig <[email protected]>2023-10-15 01:30:12 +0100
commit0621e957a0ddc7010d46b3ea3ddc8b9852bc8333 (patch)
treef6caefe939109e55a73e9141c736d2f6c20f51e8 /examples/stm32wl/src/bin/rtc.rs
parent7559f9e5834799b041d899767ef4305dcfdf0181 (diff)
time: Update examples, tests, and other code to use new Timer::after_x convenience methods
Diffstat (limited to 'examples/stm32wl/src/bin/rtc.rs')
-rw-r--r--examples/stm32wl/src/bin/rtc.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32wl/src/bin/rtc.rs b/examples/stm32wl/src/bin/rtc.rs
index a6bb28013..9ebb05f22 100644
--- a/examples/stm32wl/src/bin/rtc.rs
+++ b/examples/stm32wl/src/bin/rtc.rs
@@ -8,7 +8,7 @@ use embassy_executor::Spawner;
8use embassy_stm32::rcc::{ClockSrc, LsConfig}; 8use embassy_stm32::rcc::{ClockSrc, LsConfig};
9use embassy_stm32::rtc::{Rtc, RtcConfig}; 9use embassy_stm32::rtc::{Rtc, RtcConfig};
10use embassy_stm32::Config; 10use embassy_stm32::Config;
11use embassy_time::{Duration, Timer}; 11use embassy_time::Timer;
12use {defmt_rtt as _, panic_probe as _}; 12use {defmt_rtt as _, panic_probe as _};
13 13
14#[embassy_executor::main] 14#[embassy_executor::main]
@@ -32,7 +32,7 @@ async fn main(_spawner: Spawner) {
32 rtc.set_datetime(now.into()).expect("datetime not set"); 32 rtc.set_datetime(now.into()).expect("datetime not set");
33 33
34 // In reality the delay would be much longer 34 // In reality the delay would be much longer
35 Timer::after(Duration::from_millis(20000)).await; 35 Timer::after_millis(20000).await;
36 36
37 let then: NaiveDateTime = rtc.now().unwrap().into(); 37 let then: NaiveDateTime = rtc.now().unwrap().into();
38 info!("Got RTC! {:?}", then.timestamp()); 38 info!("Got RTC! {:?}", then.timestamp());