mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:07:46 +00:00
LibCore: Don't wait for negative amount of time
This commit is contained in:
parent
c1276559ba
commit
e0e26c6c67
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