17 std::unique_ptr<ev_timer> timer(
new ev_timer);
27 if (!ev_is_active(
m_timer.get())) {
29 ev_timer_start(loop,
m_timer.get());
36 if (ev_is_active(
m_timer.get())) {
38 ev_timer_stop(loop,
m_timer.get());
void stop_watcher(worker *worker)
Deactivate the underlying watcher.
std::unique_ptr< ev_timer > m_timer
void start_watcher(worker *worker)
Activate the underlying watcher to listen for I/O or timer events.
bool exec_in_worker_ctx(task_func_t f)
std::string get_string() const
timer_task(double after, double repeat)