Fix tv_nsec == 1000000000 case in timerfd_manager (#99)

This commit is contained in:
Vitaliy Filippov
2025-10-27 20:57:29 +03:00
parent b55d406386
commit c8cc17dbe9
+1 -1
View File
@@ -36,7 +36,7 @@ void timerfd_manager_t::inc_timer(timerfd_timer_t & t)
{
t.next.tv_sec += t.micros/1000000;
t.next.tv_nsec += (t.micros%1000000)*1000;
if (t.next.tv_nsec > 1000000000)
if (t.next.tv_nsec >= 1000000000)
{
t.next.tv_sec++;
t.next.tv_nsec -= 1000000000;