Utility clas for online FPS estimation.
More...
#include <FPSEstimator.h>
|
| FPSEstimator (int n=2) |
| Constructor. More...
|
|
virtual | ~FPSEstimator () |
| virtual destructor More...
|
|
void | reset (int n) |
| Sets a new averaging interval. More...
|
|
virtual void | tic () const |
| pushes current time into the time averaging queue and pop oldest time from the queue More...
|
|
virtual float | getFPSVal () const |
| applies tic() and returns current FPS estimate More...
|
|
virtual std::string | getFPSString (const std::string &fmt="%3.4f fps", int bufferSize=30) const |
| applies tic() and returns current fps estimate as formated string More...
|
|
virtual void | showFPS (const std::string &text="") const |
| applies tic() and shows current FPS estimate on std::out More...
|
|
Utility clas for online FPS estimation.
◆ FPSEstimator()
icl::utils::FPSEstimator::FPSEstimator |
( |
int |
n = 2 | ) |
|
Constructor.
Current FPS values are averaged over given intervall n
◆ ~FPSEstimator()
virtual icl::utils::FPSEstimator::~FPSEstimator |
( |
| ) |
|
|
inlinevirtual |
◆ getFPSString()
virtual std::string icl::utils::FPSEstimator::getFPSString |
( |
const std::string & |
fmt = "%3.4f fps" , |
|
|
int |
bufferSize = 30 |
|
) |
| const |
|
virtual |
◆ getFPSVal()
virtual float icl::utils::FPSEstimator::getFPSVal |
( |
| ) |
const |
|
virtual |
◆ reset()
void icl::utils::FPSEstimator::reset |
( |
int |
n | ) |
|
Sets a new averaging interval.
◆ showFPS()
virtual void icl::utils::FPSEstimator::showFPS |
( |
const std::string & |
text = "" | ) |
const |
|
virtual |
◆ tic()
virtual void icl::utils::FPSEstimator::tic |
( |
| ) |
const |
|
virtual |
pushes current time into the time averaging queue and pop oldest time from the queue
Reimplemented in icl::utils::FPSLimiter.
◆ m_iN
int icl::utils::FPSEstimator::m_iN |
|
private |
◆ m_qTimes
std::deque<Time> icl::utils::FPSEstimator::m_qTimes |
|
mutableprivate |
The documentation for this class was generated from the following file: