Bites
A small library of miscellaneous C++ codes.
 All Classes Namespaces Functions Friends Pages
Public Member Functions | List of all members
bites::RateTicker Class Reference

#include <RateTicker.hpp>

Public Member Functions

 RateTicker (const std::vector< float > &periods)
 
std::vector< float > tick ()
 

Detailed Description

Continuous computation of rates of ticking.

Constructor & Destructor Documentation

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.)

Member Function Documentation

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.


The documentation for this class was generated from the following files: