MCPcopy Create free account
hub / github.com/Shangyizhou/A-Tiny-Network-Library / TimerQueue

Method TimerQueue

src/timer/TimerQueue.cc:26–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26TimerQueue::TimerQueue(EventLoop* loop)
27 : loop_(loop),
28 timerfd_(createTimerfd()),
29 timerfdChannel_(loop_, timerfd_),
30 timers_()
31{
32 timerfdChannel_.setReadCallback(
33 std::bind(&TimerQueue::handleRead, this));
34 timerfdChannel_.enableReading();
35}
36
37TimerQueue::~TimerQueue()
38{

Callers

nothing calls this directly

Calls 3

createTimerfdFunction · 0.85
setReadCallbackMethod · 0.45
enableReadingMethod · 0.45

Tested by

no test coverage detected