diff --git a/LibCore/CEventLoop.cpp b/LibCore/CEventLoop.cpp index 7fccd26109..0b6e426821 100644 --- a/LibCore/CEventLoop.cpp +++ b/LibCore/CEventLoop.cpp @@ -171,7 +171,8 @@ void CEventLoop::wait_for_event() } timeval now; - gettimeofday(&now, nullptr); + if (!s_timers->is_empty()) + gettimeofday(&now, nullptr); for (auto& it : *s_timers) { auto& timer = *it.value;