aboutsummaryrefslogtreecommitdiff
path: root/tests/stm32/src/bin/timer.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 /tests/stm32/src/bin/timer.rs
parent7559f9e5834799b041d899767ef4305dcfdf0181 (diff)
time: Update examples, tests, and other code to use new Timer::after_x convenience methods
Diffstat (limited to 'tests/stm32/src/bin/timer.rs')
-rw-r--r--tests/stm32/src/bin/timer.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/stm32/src/bin/timer.rs b/tests/stm32/src/bin/timer.rs
index f8b453cda..4efeb0a49 100644
--- a/tests/stm32/src/bin/timer.rs
+++ b/tests/stm32/src/bin/timer.rs
@@ -7,7 +7,7 @@ mod common;
7use common::*; 7use common::*;
8use defmt::assert; 8use defmt::assert;
9use embassy_executor::Spawner; 9use embassy_executor::Spawner;
10use embassy_time::{Duration, Instant, Timer}; 10use embassy_time::{Instant, Timer};
11 11
12#[embassy_executor::main] 12#[embassy_executor::main]
13async fn main(_spawner: Spawner) { 13async fn main(_spawner: Spawner) {
@@ -15,7 +15,7 @@ async fn main(_spawner: Spawner) {
15 info!("Hello World!"); 15 info!("Hello World!");
16 16
17 let start = Instant::now(); 17 let start = Instant::now();
18 Timer::after(Duration::from_millis(100)).await; 18 Timer::after_millis(100).await;
19 let end = Instant::now(); 19 let end = Instant::now();
20 let ms = (end - start).as_millis(); 20 let ms = (end - start).as_millis();
21 info!("slept for {} ms", ms); 21 info!("slept for {} ms", ms);