From e0e26c6c679cad38c809ff3d898d135e505c67ff Mon Sep 17 00:00:00 2001 From: Tom Date: Sat, 31 Oct 2020 10:32:02 -0600 Subject: LibCore: Don't wait for negative amount of time --- Libraries/LibCore/EventLoop.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibCore/EventLoop.cpp b/Libraries/LibCore/EventLoop.cpp index e5b3b7428f..646e8d3e8c 100644 --- a/Libraries/LibCore/EventLoop.cpp +++ b/Libraries/LibCore/EventLoop.cpp @@ -584,7 +584,7 @@ retry: now.tv_sec = now_spec.tv_sec; now.tv_usec = now_spec.tv_nsec / 1000; timeval_sub(next_timer_expiration.value(), now, timeout); - if (timeout.tv_sec < 0) { + if (timeout.tv_sec < 0 || (timeout.tv_sec == 0 && timeout.tv_usec < 0)) { timeout.tv_sec = 0; timeout.tv_usec = 0; } -- cgit v1.2.3