ST_engine  0.3-ALPHA
Public Member Functions | List of all members
fps Class Reference

An fps counter. More...

#include <fps.hpp>

Public Member Functions

void update (double time, double frame_time)
 
float get_value () const
 

Detailed Description

An fps counter.

Provides average frame-rates over ~1 second. We need this class, because the framerate is otherwise constantly fluctuating.

Definition at line 21 of file fps.hpp.

Member Function Documentation

◆ get_value()

float fps::get_value ( ) const
Returns
The current average framerate value.

Definition at line 41 of file fps.cpp.

◆ update()

void fps::update ( double  time,
double  frame_time 
)

Updates the fps counter with the current time and current frame_time.

Parameters
timeThe current time.
frame_timeThe current frame time.

Definition at line 17 of file fps.cpp.


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