#include <RateTicker.hpp>
Public Member Functions | |
RateTicker (const std::vector< float > &periods) | |
std::vector< float > | tick () |
Continuous computation of rates of ticking.
bites::RateTicker::RateTicker | ( | const std::vector< float > & | periods | ) |
Initialize the object with a tuple of time periods in seconds. For example, use (60, 300, 900) to track rates at 1, 5 and 15 minute periods (like when reporting system load.)
std::vector< float > bites::RateTicker::tick | ( | ) |
Tick the ticker. Return a tuple of values corresponding to periods given in initializer, each value representing the rate of ticks (number of ticks per second) during that period.