75 DescriptorEventReceiver::DescriptorEventReceiver(
const std::string& name,
76 DescriptorEventPublisher& descriptorEventPublisher,
77 const utils::Timeval& timeout)
79 , descriptorEventPublisher(descriptorEventPublisher)
80 , maxInactivity(timeout)
81 , initialTimeout(timeout) {
139 void DescriptorEventReceiver::resume() {
143 lastTriggered = utils::Timeval::currentTime();
144 descriptorEventPublisher.resume(
this);
146 LOG(WARNING) << getName() <<
": Double resume";
149 LOG(WARNING) << getName() <<
": Resume while not enabled";
157 void DescriptorEventReceiver::setTimeout(
const utils::Timeval& timeout) {
158 if (timeout == TIMEOUT::DEFAULT) {
159 this->maxInactivity = initialTimeout;
161 this->maxInactivity = timeout;
164 triggered(utils::Timeval::currentTime());