1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-22 16:35:08 +00:00

CEventLoop: Don't call gettimeofday() at all if there are no timers.

This commit is contained in:
Andreas Kling 2019-04-18 13:23:59 +02:00
parent ae3ec3fc37
commit 3b986da643

View file

@ -171,6 +171,7 @@ void CEventLoop::wait_for_event()
}
timeval now;
if (!s_timers->is_empty())
gettimeofday(&now, nullptr);
for (auto& it : *s_timers) {