mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
CEventLoop: Don't call gettimeofday() at all if there are no timers.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user