| 15 | using TimerCallback = std::function<void()>; |
| 16 | |
| 17 | Timer(TimerCallback cb, Timestamp when, double interval) |
| 18 | : callback_(move(cb)), |
| 19 | expiration_(when), |
| 20 | interval_(interval), |
| 21 | repeat_(interval > 0.0) // 一次性定时器设置为0 |
| 22 | { |
| 23 | } |
| 24 | |
| 25 | void run() const |
| 26 | { |
nothing calls this directly
no outgoing calls
no test coverage detected