File tree Expand file tree Collapse file tree 7 files changed +14
-14
lines changed
Expand file tree Collapse file tree 7 files changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ async fn run_med() {
8080 info ! ( " [med] Starting long computation" ) ;
8181
8282 // Spin-wait to simulate a long CPU computation
83- cortex_m :: asm :: delay ( 32_000_000 ) ; // ~1 second
83+ embassy_time :: block_for ( embassy_time :: Duration :: from_secs ( 1 ) ) ; // ~1 second
8484
8585 let end = Instant :: now ( ) ;
8686 let ms = end. duration_since ( start) . as_ticks ( ) / 33 ;
@@ -97,7 +97,7 @@ async fn run_low() {
9797 info ! ( "[low] Starting long computation" ) ;
9898
9999 // Spin-wait to simulate a long CPU computation
100- cortex_m :: asm :: delay ( 64_000_000 ) ; // ~2 seconds
100+ embassy_time :: block_for ( embassy_time :: Duration :: from_secs ( 2 ) ) ; // ~2 seconds
101101
102102 let end = Instant :: now ( ) ;
103103 let ms = end. duration_since ( start) . as_ticks ( ) / 33 ;
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ async fn run_med() {
8080 info ! ( " [med] Starting long computation" ) ;
8181
8282 // Spin-wait to simulate a long CPU computation
83- cortex_m :: asm :: delay ( 125_000_000 ) ; // ~1 second
83+ embassy_time :: block_for ( embassy_time :: Duration :: from_secs ( 1 ) ) ; // ~1 second
8484
8585 let end = Instant :: now ( ) ;
8686 let ms = end. duration_since ( start) . as_ticks ( ) * 1000 / TICK_HZ ;
@@ -97,7 +97,7 @@ async fn run_low() {
9797 info ! ( "[low] Starting long computation" ) ;
9898
9999 // Spin-wait to simulate a long CPU computation
100- cortex_m :: asm :: delay ( 250_000_000 ) ; // ~2 seconds
100+ embassy_time :: block_for ( embassy_time :: Duration :: from_secs ( 2 ) ) ; // ~2 seconds
101101
102102 let end = Instant :: now ( ) ;
103103 let ms = end. duration_since ( start) . as_ticks ( ) * 1000 / TICK_HZ ;
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ async fn run_med() {
8080 info ! ( " [med] Starting long computation" ) ;
8181
8282 // 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
8484
8585 let end = Instant :: now ( ) ;
8686 let ms = end. duration_since ( start) . as_ticks ( ) / 33 ;
@@ -97,7 +97,7 @@ async fn run_low() {
9797 info ! ( "[low] Starting long computation" ) ;
9898
9999 // 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
101101
102102 let end = Instant :: now ( ) ;
103103 let ms = end. duration_since ( start) . as_ticks ( ) / 33 ;
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ async fn run_med() {
8080 info ! ( " [med] Starting long computation" ) ;
8181
8282 // 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
8484
8585 let end = Instant :: now ( ) ;
8686 let ms = end. duration_since ( start) . as_ticks ( ) / 33 ;
@@ -97,7 +97,7 @@ async fn run_low() {
9797 info ! ( "[low] Starting long computation" ) ;
9898
9999 // 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
101101
102102 let end = Instant :: now ( ) ;
103103 let ms = end. duration_since ( start) . as_ticks ( ) / 33 ;
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ async fn run_med() {
8080 info ! ( " [med] Starting long computation" ) ;
8181
8282 // 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
8484
8585 let end = Instant :: now ( ) ;
8686 let ms = end. duration_since ( start) . as_ticks ( ) / 33 ;
@@ -97,7 +97,7 @@ async fn run_low() {
9797 info ! ( "[low] Starting long computation" ) ;
9898
9999 // 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
101101
102102 let end = Instant :: now ( ) ;
103103 let ms = end. duration_since ( start) . as_ticks ( ) / 33 ;
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ async fn run_med() {
8080 info ! ( " [med] Starting long computation" ) ;
8181
8282 // Spin-wait to simulate a long CPU computation
83- cortex_m :: asm :: delay ( 128_000_000 ) ; // ~1 second
83+ embassy_time :: block_for ( embassy_time :: Duration :: from_secs ( 1 ) ) ; // ~1 second
8484
8585 let end = Instant :: now ( ) ;
8686 let ms = end. duration_since ( start) . as_ticks ( ) / 33 ;
@@ -97,7 +97,7 @@ async fn run_low() {
9797 info ! ( "[low] Starting long computation" ) ;
9898
9999 // Spin-wait to simulate a long CPU computation
100- cortex_m :: asm :: delay ( 256_000_000 ) ; // ~2 seconds
100+ embassy_time :: block_for ( embassy_time :: Duration :: from_secs ( 2 ) ) ; // ~2 seconds
101101
102102 let end = Instant :: now ( ) ;
103103 let ms = end. duration_since ( start) . as_ticks ( ) / 33 ;
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ async fn run_med() {
8080 info ! ( " [med] Starting long computation" ) ;
8181
8282 // Spin-wait to simulate a long CPU computation
83- cortex_m :: asm :: delay ( 128_000_000 ) ; // ~1 second
83+ embassy_time :: block_for ( embassy_time :: Duration :: from_secs ( 1 ) ) ; // ~1 second
8484
8585 let end = Instant :: now ( ) ;
8686 let ms = end. duration_since ( start) . as_ticks ( ) / 33 ;
@@ -97,7 +97,7 @@ async fn run_low() {
9797 info ! ( "[low] Starting long computation" ) ;
9898
9999 // Spin-wait to simulate a long CPU computation
100- cortex_m :: asm :: delay ( 256_000_000 ) ; // ~2 seconds
100+ embassy_time :: block_for ( embassy_time :: Duration :: from_secs ( 2 ) ) ; // ~2 seconds
101101
102102 let end = Instant :: now ( ) ;
103103 let ms = end. duration_since ( start) . as_ticks ( ) / 33 ;
You can’t perform that action at this time.
0 commit comments