libc: fix expired-timer calculation
This commit is contained in:
parent
c1edfa5d46
commit
f865b71f27
|
@ -252,7 +252,10 @@ struct Libc::Timeout
|
||||||
{
|
{
|
||||||
unsigned long const now = _timer_accessor.timer().curr_time();
|
unsigned long const now = _timer_accessor.timer().curr_time();
|
||||||
|
|
||||||
return _expired ? 0 : _absolute_timeout_ms - now;
|
if (_expired || _absolute_timeout_ms < now)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
return _absolute_timeout_ms - now;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue