Kanzi Connect  3.9.9
Kanzi Connect C++ API
kanzi::connect::ConnectStreamPlaybackUtil::FpsCounter Class Reference

A helper class that can be used to measure events per second. More...

#include <stream_util_connect.hpp>

Public Member Functions

void countUp ()
 Counts frames and calculates average fps. More...
 
 FpsCounter ()
 Constructor. Implicitly calls start() method. More...
 
int getFps ()
 Get current average frames per second number. More...
 
bool haveNewValue () const
 
void restart ()
 Starts to track the time. Can be used to restart the time measurement. More...
 

Detailed Description

A helper class that can be used to measure events per second.

When an instance of this class is created, the time measurement is automatically started. To count event and to count per second average call countUp().

Constructor & Destructor Documentation

◆ FpsCounter()

kanzi::connect::ConnectStreamPlaybackUtil::FpsCounter::FpsCounter ( )
inline

Constructor. Implicitly calls start() method.

Member Function Documentation

◆ countUp()

void kanzi::connect::ConnectStreamPlaybackUtil::FpsCounter::countUp ( )
inline

Counts frames and calculates average fps.

◆ getFps()

int kanzi::connect::ConnectStreamPlaybackUtil::FpsCounter::getFps ( )
inline

Get current average frames per second number.

◆ haveNewValue()

bool kanzi::connect::ConnectStreamPlaybackUtil::FpsCounter::haveNewValue ( ) const
inline

◆ restart()

void kanzi::connect::ConnectStreamPlaybackUtil::FpsCounter::restart ( )
inline

Starts to track the time. Can be used to restart the time measurement.


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