Fling Engine  0.00.1
Fling Engine is a game engine written in Vulkan
Public Member Functions | Private Attributes
Fling::Timing Class Reference

#include <Timing.h>

Inherits Fling::Singleton< Timing >.

Public Member Functions

virtual void Init () override
 
void Update ()
 Update the time values of the timer. More...
 
void UpdateFps ()
 Updates current frame timer More...
 
float FLING_API GetDeltaTime ()
 
double FLING_API GetTime () const
 Get the current time of the application (double) More...
 
float FLING_API GetTimef () const
 Get the current time of the application (float) More...
 
float FLING_API GetFrameStartTime () const
 Get the time that that frame has started. More...
 
double FLING_API GetStartTime () const
 Get the time that the application has started. More...
 
float FLING_API GetTimeSinceStart () const
 Get the time since that application has started (i.e. More...
 
int FLING_API GetFrameCount () const
 Get fps count. More...
 
float FLING_API GetFrameTime () const
 Get current frame time. More...
 
- Public Member Functions inherited from Fling::Singleton< Timing >
virtual FLING_API void Shutdown ()
 

Private Attributes

float m_deltaTime = 1.0f / 60.0f
 
double m_lastFrameStartTime = 0.0
 
float m_frameStartTimef = 0.0f
 
float m_fpsTimeElapsed = 0.0f
 
int m_fpsFrameCount = 0
 
int m_fpsFrameCountTemp = 0
 
double m_startTime = 0.0
 The time that the program started. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Fling::Singleton< Timing >
static TimingGet ()
 
- Protected Member Functions inherited from Fling::Singleton< Timing >
 Singleton ()=default
 Every singleton must have a default constructor so that explicit creation and destruction of them is maintained. More...
 

Member Function Documentation

◆ GetDeltaTime()

float Fling::Timing::GetDeltaTime ( )

◆ GetFrameCount()

int FLING_API Fling::Timing::GetFrameCount ( ) const
inline

Get fps count.

Returns
int GetFrameCount

◆ GetFrameStartTime()

float FLING_API Fling::Timing::GetFrameStartTime ( ) const
inline

Get the time that that frame has started.

Returns
float GetFrameStartTime

◆ GetFrameTime()

float FLING_API Fling::Timing::GetFrameTime ( ) const
inline

Get current frame time.

Returns
float GetFrameTime

◆ GetStartTime()

double FLING_API Fling::Timing::GetStartTime ( ) const
inline

Get the time that the application has started.

Returns
double GetStartTime

◆ GetTime()

double Fling::Timing::GetTime ( ) const

Get the current time of the application (double)

Returns
double GetTime

◆ GetTimef()

float FLING_API Fling::Timing::GetTimef ( ) const
inline

Get the current time of the application (float)

Returns
float GetTimef

◆ GetTimeSinceStart()

float FLING_API Fling::Timing::GetTimeSinceStart ( ) const
inline

Get the time since that application has started (i.e.

time running)

Returns
float GetTimeSinceStart

◆ Init()

void Fling::Timing::Init ( )
overridevirtual

Reimplemented from Fling::Singleton< Timing >.

◆ Update()

void Fling::Timing::Update ( )

Update the time values of the timer.

Should be done at the beginning of every frame

◆ UpdateFps()

void Fling::Timing::UpdateFps ( )

Updates current frame timer

Field Documentation

◆ m_deltaTime

float Fling::Timing::m_deltaTime = 1.0f / 60.0f
private

◆ m_fpsFrameCount

int Fling::Timing::m_fpsFrameCount = 0
private

◆ m_fpsFrameCountTemp

int Fling::Timing::m_fpsFrameCountTemp = 0
private

◆ m_fpsTimeElapsed

float Fling::Timing::m_fpsTimeElapsed = 0.0f
private

◆ m_frameStartTimef

float Fling::Timing::m_frameStartTimef = 0.0f
private

◆ m_lastFrameStartTime

double Fling::Timing::m_lastFrameStartTime = 0.0
private

◆ m_startTime

double Fling::Timing::m_startTime = 0.0
private

The time that the program started.


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