From a2f153249f926876e7169016f3dc8e861a9ef065 Mon Sep 17 00:00:00 2001 From: Emil Fresk Date: Sat, 1 Apr 2023 20:48:23 +0200 Subject: Added nRF monotonics --- rtic-time/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'rtic-time/src/lib.rs') diff --git a/rtic-time/src/lib.rs b/rtic-time/src/lib.rs index 78b57a4..9bf1485 100644 --- a/rtic-time/src/lib.rs +++ b/rtic-time/src/lib.rs @@ -131,7 +131,7 @@ impl TimerQueue { let head = self.queue.pop_if(|head| { release_at = Some(head.release_at); - let should_pop = Mono::now() >= head.release_at; + let should_pop = Mono::should_dequeue_check(head.release_at); head.was_poped.store(should_pop, Ordering::Relaxed); should_pop @@ -145,7 +145,7 @@ impl TimerQueue { Mono::enable_timer(); Mono::set_compare(instant); - if Mono::now() >= instant { + if Mono::should_dequeue_check(instant) { // The time for the next instant passed while handling it, // continue dequeueing continue; -- cgit v1.2.3