mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-22 06:57:51 +00:00
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
Block a user