summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--louloulibs/utils/timed_events.cpp2
-rw-r--r--tests/timed_events.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/louloulibs/utils/timed_events.cpp b/louloulibs/utils/timed_events.cpp
index 6b936c4..68d009c 100644
--- a/louloulibs/utils/timed_events.cpp
+++ b/louloulibs/utils/timed_events.cpp
@@ -27,7 +27,7 @@ bool TimedEvent::is_after(const TimedEvent& other) const
bool TimedEvent::is_after(const std::chrono::steady_clock::time_point& time_point) const
{
- return this->time_point >= time_point;
+ return this->time_point > time_point;
}
std::chrono::milliseconds TimedEvent::get_timeout() const
diff --git a/tests/timed_events.cpp b/tests/timed_events.cpp
index 3844f3d..d63abef 100644
--- a/tests/timed_events.cpp
+++ b/tests/timed_events.cpp
@@ -39,7 +39,7 @@ TEST_CASE("Test timed event expiration")
std::chrono::milliseconds timoute = TimedEventsManager::instance().get_timeout();
INFO("Sleeping for " << timoute.count() << "ms");
- std::this_thread::sleep_for(timoute);
+ std::this_thread::sleep_for(timoute + 1ms);
// Event is now expired
CHECK(TimedEventsManager::instance().execute_expired_events() == 1);