LibCore: Fix timer expiration processing

The previous code did not account for the case when there are timers present,
but none are enabled, and used a zero polling timeout.

Fixes https://github.com/SerenityOS/serenity/issues/2222
This commit is contained in:
Sergey Bugaev 2020-05-15 18:21:40 +03:00 committed by Andreas Kling
commit 345fbd1fc1
Notes: sideshowbarker 2024-07-19 06:37:56 +09:00
2 changed files with 9 additions and 12 deletions

View file

@ -77,7 +77,7 @@ public:
private:
void wait_for_event(WaitMode);
void get_next_timer_expiration(timeval&);
Optional<struct timeval> get_next_timer_expiration();
struct QueuedEvent {
AK_MAKE_NONCOPYABLE(QueuedEvent);