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

Method Timer

include/tiny_network/timer/Timer.h:17–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected