mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-05 15:49:11 +00: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: e0e26c6c67
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_sec = now_spec.tv_sec;
|
||||||
now.tv_usec = now_spec.tv_nsec / 1000;
|
now.tv_usec = now_spec.tv_nsec / 1000;
|
||||||
timeval_sub(next_timer_expiration.value(), now, timeout);
|
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_sec = 0;
|
||||||
timeout.tv_usec = 0;
|
timeout.tv_usec = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue