diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2023-04-04 20:03:58 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-04 20:03:58 +0000 |
| commit | 72ae46083e64acc012c6b85d3ef7a115657a01e3 (patch) | |
| tree | 024dbdb94cb5537312c5c34f121257265c165bea /rtic-time/src/lib.rs | |
| parent | 064cf19265f72d7f01e0847c545e6250391a2172 (diff) | |
| parent | aeec8bd41bdf3d57098902407ec320f59365641a (diff) | |
Merge #721
721: Added nRF monotonics r=perlindgren a=korken89
Testing completed
Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
Diffstat (limited to 'rtic-time/src/lib.rs')
| -rw-r--r-- | rtic-time/src/lib.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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<Mono: Monotonic> TimerQueue<Mono> { 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<Mono: Monotonic> TimerQueue<Mono> { 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; |
