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