9 YARP_LOG_COMPONENT(EVENT_DOWNSAMPLER,
"event-downsampler")
13 mutex =
new std::mutex();
35 size_t diff = counter - latch_1;
36 bool cp = !isdownsampling;
69 expire_time = yarp::os::Time::now();
71 timer =
new yarp::os::Timer(ts, &mcEventDownsampler::step,
this,
true, mutex);
84 bool mcEventDownsampler::step(
const yarp::os::YarpTimerEvent &event)
86 if (yarp::os::Time::now() - expire_time >= 1)
88 expire_time = yarp::os::Time::now();
102 void mcEventDownsampler::printreport()
105 <<
"detected" << counter - latch_2 <<
"events on aggregate since the last message";