MCPcopy Create free account
hub / github.com/acl-dev/acl / timer_callback

Method timer_callback

lib_fiber/samples-c++1x/aio_server/main.cpp:268–278  ·  view source on GitHub ↗

@override

Source from the content-addressed store, hash-verified

266
267 // @override
268 void timer_callback(unsigned int id) override {
269 time_t now = time(nullptr);
270 delay_ += 1000000;
271 this->set_task(id_, delay_);
272
273 printf("timer id=%u, delay=%ld, next delay=%lld\r\n",
274 id, (long) (now - last_), delay_);
275
276 last_ = now;
277 id_ = id;
278 }
279
280private:
281 unsigned int id_;

Callers

nothing calls this directly

Calls 1

set_taskMethod · 0.45

Tested by

no test coverage detected