event/TimerEvent: assign due
in Schedule()
This commit is contained in:

committed by
Max Kellermann

parent
2a30acd99c
commit
271b287356
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user