Deki 1.3.0
Modular C++ 2D engine for embedded displays and desktop
Loading...
Searching...
No Matches
DekiFPSCounter Class Reference

FPS counter for tracking and displaying frame rate. More...

#include <DekiFPSCounter.h>

Public Member Functions

 DekiFPSCounter ()
void BeginFrame ()
 Call this at the start of each frame.
void EndFrame ()
 Call this at the end of each frame.
float GetFPS () const
 Get the current FPS.
float GetMinFPS () const
 Get the minimum FPS recorded.
float GetMaxFPS () const
 Get the maximum FPS recorded.
uint32_t GetTotalFrames () const
 Get total frames counted.
float GetAverageFrameTime () const
 Get the average frame time in milliseconds.
void Reset ()
 Reset FPS statistics.
void SetEnabled (bool enable)
 Enable or disable FPS counting.
bool IsEnabled () const
 Check if FPS counter is enabled.
void PrintStats () const
 Print FPS stats to log.

Detailed Description

FPS counter for tracking and displaying frame rate.

This utility measures actual FPS achieved by the engine including all packages (rendering, input processing, etc.)

Constructor & Destructor Documentation

◆ DekiFPSCounter()

DekiFPSCounter::DekiFPSCounter ( )

Member Function Documentation

◆ BeginFrame()

void DekiFPSCounter::BeginFrame ( )

Call this at the start of each frame.

◆ EndFrame()

void DekiFPSCounter::EndFrame ( )

Call this at the end of each frame.

◆ GetFPS()

float DekiFPSCounter::GetFPS ( ) const
inline

Get the current FPS.

◆ GetMinFPS()

float DekiFPSCounter::GetMinFPS ( ) const
inline

Get the minimum FPS recorded.

◆ GetMaxFPS()

float DekiFPSCounter::GetMaxFPS ( ) const
inline

Get the maximum FPS recorded.

◆ GetTotalFrames()

uint32_t DekiFPSCounter::GetTotalFrames ( ) const
inline

Get total frames counted.

◆ GetAverageFrameTime()

float DekiFPSCounter::GetAverageFrameTime ( ) const

Get the average frame time in milliseconds.

◆ Reset()

void DekiFPSCounter::Reset ( )

Reset FPS statistics.

◆ SetEnabled()

void DekiFPSCounter::SetEnabled ( bool enable)
inline

Enable or disable FPS counting.

◆ IsEnabled()

bool DekiFPSCounter::IsEnabled ( ) const
inline

Check if FPS counter is enabled.

◆ PrintStats()

void DekiFPSCounter::PrintStats ( ) const

Print FPS stats to log.


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