#include <FramerateCounter.h>
Public Member Functions | |
FramerateCounter (unsigned int queue=10) | |
double | getMeanValue () |
void | print (double interval, std::ostream &stream) |
void | trigger () |
virtual | ~FramerateCounter () |
Private Attributes | |
std::list< double > | _fpsList |
bool | _isDirty |
unsigned int | _queue |
Timer * | _tElapsed |
Timer * | _tPrint |
Framerate calculation helper
Definition at line 30 of file FramerateCounter.h.
optris::FramerateCounter::FramerateCounter | ( | unsigned int | queue = 10 | ) |
Standard constructor
[in] | queue | Queue length to average |
virtual optris::FramerateCounter::~FramerateCounter | ( | ) | [virtual] |
Standard destructor
double optris::FramerateCounter::getMeanValue | ( | ) |
Calculate mean value of queue
void optris::FramerateCounter::print | ( | double | interval, |
std::ostream & | stream | ||
) |
Print frame rate at reduced time interval
[in] | interval | time interval |
[in] | output | stream |
void optris::FramerateCounter::trigger | ( | ) |
Trigger, i.e., increase counter
std::list<double> optris::FramerateCounter::_fpsList [private] |
Definition at line 70 of file FramerateCounter.h.
bool optris::FramerateCounter::_isDirty [private] |
Definition at line 72 of file FramerateCounter.h.
unsigned int optris::FramerateCounter::_queue [private] |
Definition at line 68 of file FramerateCounter.h.
Timer* optris::FramerateCounter::_tElapsed [private] |
Definition at line 64 of file FramerateCounter.h.
Timer* optris::FramerateCounter::_tPrint [private] |
Definition at line 66 of file FramerateCounter.h.