diff options
Diffstat (limited to 'tests/stm32/src/bin/rtc.rs')
| -rw-r--r-- | tests/stm32/src/bin/rtc.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/stm32/src/bin/rtc.rs b/tests/stm32/src/bin/rtc.rs index 46fdbfaeb..64f1122a6 100644 --- a/tests/stm32/src/bin/rtc.rs +++ b/tests/stm32/src/bin/rtc.rs | |||
| @@ -12,7 +12,7 @@ use defmt::assert; | |||
| 12 | use embassy_executor::Spawner; | 12 | use embassy_executor::Spawner; |
| 13 | use embassy_stm32::rcc::LsConfig; | 13 | use embassy_stm32::rcc::LsConfig; |
| 14 | use embassy_stm32::rtc::{Rtc, RtcConfig}; | 14 | use embassy_stm32::rtc::{Rtc, RtcConfig}; |
| 15 | use embassy_time::{Duration, Timer}; | 15 | use embassy_time::Timer; |
| 16 | 16 | ||
| 17 | #[embassy_executor::main] | 17 | #[embassy_executor::main] |
| 18 | async fn main(_spawner: Spawner) { | 18 | async fn main(_spawner: Spawner) { |
| @@ -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 | info!("Waiting 5 seconds"); | 34 | info!("Waiting 5 seconds"); |
| 35 | Timer::after(Duration::from_millis(5000)).await; | 35 | Timer::after_millis(5000).await; |
| 36 | 36 | ||
| 37 | let then: NaiveDateTime = rtc.now().unwrap().into(); | 37 | let then: NaiveDateTime = rtc.now().unwrap().into(); |
| 38 | let seconds = (then - now).num_seconds(); | 38 | let seconds = (then - now).num_seconds(); |
