| 22 | } |
| 23 | |
| 24 | void CAioTimer::timer_callback(unsigned int id) |
| 25 | { |
| 26 | const char* s = keep_timer() ? "keep timer" : "cancel timer"; |
| 27 | std::cout << "timer " << id_ << ':' << id << " callback! " << s << std::endl; |
| 28 | if (inited_) |
| 29 | return; |
| 30 | inited_ = true; |
| 31 | #if 0 |
| 32 | handle_->del_timer(this); |
| 33 | handle_->delay_free(this); |
| 34 | #elif 1 |
| 35 | set_task(1, 5000000); |
| 36 | set_task(2, 4000000); |
| 37 | set_task(3, 3000000); |
| 38 | set_task(4, 2000000); |
| 39 | set_task(5, 1000000); |
| 40 | #endif |
| 41 | } |
| 42 | |
| 43 | void CAioTimer::destroy(void) |
| 44 | { |
nothing calls this directly
no test coverage detected