1#include "vanetza/rpc/asio_event_port.hpp"
3#include <boost/asio/post.hpp>
14 clock_(kj::systemPreciseMonotonicClock()),
36 if (runnable && loop_) {
37 boost::asio::post(io_, [
this]() {
38 if (loop_ && loop_->isRunnable()) {
47 timer_.advanceTo(clock_.now());
52 std::chrono::nanoseconds dt {
53 timer_.timeoutToNextEvent(clock_.now(), kj::NANOSECONDS, kj::maxValue)
54 .map([](uint64_t ns) {
return ns; })
57 if (dt > std::chrono::nanoseconds::zero()) {
58 steady_timer_.expires_after(dt);
59 steady_timer_.async_wait([
this](
const boost::system::error_code& ec) {