diff options
author | MarcoFalke <falke.marco@gmail.com> | 2021-05-14 12:52:15 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2021-05-14 12:49:16 +0200 |
commit | fa2e614d16af84327adf1c02746d0f73e0f48111 (patch) | |
tree | 9b376181d98a70c87164de57c3bf6abc3ed6d0b2 /src/scheduler.cpp | |
parent | 61fea5217118e19e0eefde4d32a11e18c841826c (diff) |
test: Fix off-by-one in mockscheduler test RPC
Diffstat (limited to 'src/scheduler.cpp')
-rw-r--r-- | src/scheduler.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/scheduler.cpp b/src/scheduler.cpp index b3ee23f139..02ada969a4 100644 --- a/src/scheduler.cpp +++ b/src/scheduler.cpp @@ -5,6 +5,7 @@ #include <scheduler.h> #include <random.h> +#include <util/time.h> #include <assert.h> #include <functional> @@ -80,7 +81,7 @@ void CScheduler::schedule(CScheduler::Function f, std::chrono::system_clock::tim void CScheduler::MockForward(std::chrono::seconds delta_seconds) { - assert(delta_seconds.count() > 0 && delta_seconds < std::chrono::hours{1}); + assert(delta_seconds > 0s && delta_seconds <= 1h); { LOCK(newTaskMutex); |