event/TimerEvent: assign due in Schedule()

This commit is contained in:
Max Kellermann
2021-02-04 21:48:27 +01:00
committed by Max Kellermann
parent 2a30acd99c
commit 271b287356
3 changed files with 15 additions and 6 deletions

View File

@@ -152,11 +152,10 @@ EventLoop::AbandonFD(SocketEvent &event) noexcept
}
void
EventLoop::AddTimer(TimerEvent &t, Event::Duration d) noexcept
EventLoop::Insert(TimerEvent &t) noexcept
{
assert(IsInside());
t.due = SteadyNow() + d;
timers.insert(t);
again = true;
}