Signed-off-by: Haomai Wang <haomai@xsky.com>
event.id = id;
event.time_cb = ctxt;
time_events[expire] = event;
- if (expire < next_time)
- wakeup();
return id;
}
if (external_num_events.load()) {
tv.tv_sec = 0;
tv.tv_usec = 0;
- next_time = now;
} else {
clock_type::time_point shortest;
shortest = now + std::chrono::microseconds(timeout_microseconds);
}
tv.tv_sec = timeout_microseconds / 1000000;
tv.tv_usec = timeout_microseconds % 1000000;
- next_time = shortest;
}
ldout(cct, 10) << __func__ << " wait second " << tv.tv_sec << " usec " << tv.tv_usec << dendl;
EventDriver *driver;
multimap<clock_type::time_point, TimeEvent> time_events;
uint64_t time_event_next_id;
- clock_type::time_point next_time; // next wake up time
int notify_receive_fd;
int notify_send_fd;
NetHandler net;