aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Emil Fresk <emil.fresk@gmail.com> 2021-02-22 20:15:13 +0100
committerGravatar Emil Fresk <emil.fresk@gmail.com> 2021-02-22 20:15:13 +0100
commite52088bbd8f4f15b0d49ced8a24c5a2fc8c8c11f (patch)
treefd4851c1506beccb51820c90a6e0d46cbafd0c15
parent1345f30a692843485208b2ecf2866010423d2f02 (diff)
downloadrtic-e52088bbd8f4f15b0d49ced8a24c5a2fc8c8c11f.tar.gz
rtic-e52088bbd8f4f15b0d49ced8a24c5a2fc8c8c11f.tar.zst
rtic-e52088bbd8f4f15b0d49ced8a24c5a2fc8c8c11f.zip
Of by 1
-rw-r--r--src/tq.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tq.rs b/src/tq.rs
index 6697f100..541ffcd1 100644
--- a/src/tq.rs
+++ b/src/tq.rs
@@ -82,7 +82,7 @@ where
mono.clear_compare_flag();
if let Some(instant) = self.0.peek().map(|p| p.instant) {
- if instant < Self::unwrapper(Clock::try_now(mono)) {
+ if instant <= Self::unwrapper(Clock::try_now(mono)) {
// task became ready
let nr = unsafe { self.0.pop_unchecked() };
@@ -96,7 +96,7 @@ where
// dequeue. If the monotonic is fast enough it can happen that from the
// read of now to the set of the compare, the time can overflow. This is to
// guard against this.
- if instant < Self::unwrapper(Clock::try_now(mono)) {
+ if instant <= Self::unwrapper(Clock::try_now(mono)) {
let nr = unsafe { self.0.pop_unchecked() };
Some((nr.task, nr.index))