diff options
Diffstat (limited to 'examples/stm32f0/src/bin')
| -rw-r--r-- | examples/stm32f0/src/bin/multiprio.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/stm32f0/src/bin/multiprio.rs b/examples/stm32f0/src/bin/multiprio.rs index 1c3f3991a..84e4077ef 100644 --- a/examples/stm32f0/src/bin/multiprio.rs +++ b/examples/stm32f0/src/bin/multiprio.rs | |||
| @@ -80,7 +80,7 @@ async fn run_med() { | |||
| 80 | info!(" [med] Starting long computation"); | 80 | info!(" [med] Starting long computation"); |
| 81 | 81 | ||
| 82 | // Spin-wait to simulate a long CPU computation | 82 | // Spin-wait to simulate a long CPU computation |
| 83 | cortex_m::asm::delay(8_000_000); // ~1 second | 83 | embassy_time::block_for(embassy_time::Duration::from_secs(1)); // ~1 second |
| 84 | 84 | ||
| 85 | let end = Instant::now(); | 85 | let end = Instant::now(); |
| 86 | let ms = end.duration_since(start).as_ticks() / 33; | 86 | let ms = end.duration_since(start).as_ticks() / 33; |
| @@ -97,7 +97,7 @@ async fn run_low() { | |||
| 97 | info!("[low] Starting long computation"); | 97 | info!("[low] Starting long computation"); |
| 98 | 98 | ||
| 99 | // Spin-wait to simulate a long CPU computation | 99 | // Spin-wait to simulate a long CPU computation |
| 100 | cortex_m::asm::delay(16_000_000); // ~2 seconds | 100 | embassy_time::block_for(embassy_time::Duration::from_secs(2)); // ~2 seconds |
| 101 | 101 | ||
| 102 | let end = Instant::now(); | 102 | let end = Instant::now(); |
| 103 | let ms = end.duration_since(start).as_ticks() / 33; | 103 | let ms = end.duration_since(start).as_ticks() / 33; |
