BRE12
Public Member Functions | List of all members
BRE::Timer Class Reference

Timer class used mainly to get frame time. More...

#include <Timer.h>

Public Member Functions

 Timer (const Timer &)=delete
 
const Timeroperator= (const Timer &)=delete
 
 Timer (Timer &&)=delete
 
Timeroperator= (Timer &&)=delete
 
__forceinline float GetDeltaTimeInSeconds () const noexcept
 Get delta time in seconds. More...
 
void Reset () noexcept
 Reset timer. More...
 
void Tick () noexcept
 Ticks the timer. More...
 

Detailed Description

Timer class used mainly to get frame time.

Member Function Documentation

§ GetDeltaTimeInSeconds()

__forceinline float BRE::Timer::GetDeltaTimeInSeconds ( ) const
inlinenoexcept

Get delta time in seconds.

Get delta time in seconds between 2 ticks, used to know the elapsed time between frames.

Returns
Time in seconds

§ Reset()

void BRE::Timer::Reset ( )
noexcept

Reset timer.

Reset timer. This should be called exactly before the game loop.

§ Tick()

void BRE::Timer::Tick ( )
noexcept

Ticks the timer.

Ticks the timer. This will cause that delta time in seconds is updated. You should call it every frame.


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