10#include <boost/date_time/posix_time/posix_time.hpp>
48 RateControl(
const int rate,
const int aggressivity);
56 boost::posix_time::ptime
getDue()
const {
A message sending rate control class for perfdhcp.
int getRate() const
Returns the rate.
static boost::posix_time::ptime currentTime()
Convenience function returning current time.
int aggressivity_
Holds an aggressivity value.
int getAggressivity() const
Returns the value of aggressivity.
RateControl()
Default constructor.
bool late_sent_
A flag which indicates that the calculated due time is in the past.
boost::posix_time::ptime last_sent_
Holds a timestamp when the last message was sent.
void setAggressivity(const int aggressivity)
Sets the value of aggressivity.
void updateSendTime()
Sets the timestamp of the last sent message to current time.
boost::posix_time::ptime getDue() const
Returns current due time to send next message.
void updateSendDue()
Calculates the send due.
boost::posix_time::ptime send_due_
Holds a timestamp when the next message should be sent.
bool isLateSent() const
Returns the value of the late send flag.
void setRate(const int rate)
Sets the new rate.
void setRelativeDue(const int offset)
Sets the value of the due time.
int rate_
Holds a desired rate value.
uint64_t getOutboundMessageCount()
Returns number of messages to be sent "now".
Defines the logger used by the top-level component of kea-dhcp-ddns.