mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 17:52:26 -05:00
LibCore: Don't wait for negative amount of time
This commit is contained in:
parent
c1276559ba
commit
e0e26c6c67
Notes:
sideshowbarker
2024-07-19 01:09:01 +09:00
Author: https://github.com/tomuta Commit: https://github.com/SerenityOS/serenity/commit/e0e26c6c679 Pull-request: https://github.com/SerenityOS/serenity/pull/4113
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue