Clutter Engine 0.0.1
Loading...
Searching...
No Matches
clt::Timer Class Reference

Timer utility class for measuring elapsed time and frame delta. More...

#include <Timer.h>

Public Member Functions

 Timer ()=default
 Default constructor.
 
 Timer (const Timer &)=delete
 Deleted copy constructor.
 
Timeroperator= (const Timer &)=delete
 Deleted copy assignment operator.
 

Static Public Member Functions

static void Initialize ()
 Initializes the timer. Should be called once at application start.
 
static f32 ComputeDeltaTime ()
 Computes the time elapsed since the last call to this function.
 
static void DelayTime (f32 seconds)
 Delays execution for a specified number of seconds.
 
static f32 GetTimeSinceLoad ()
 Gets the time in seconds since the timer was initialized.
 

Static Public Attributes

static f32 deltaTime = 0
 The most recently computed delta time in seconds.
 
static f32 clampedDeltaTime = 0
 The most recently computed delta time, clamped to a maximum value.
 

Detailed Description

Timer utility class for measuring elapsed time and frame delta.

Member Function Documentation

◆ ComputeDeltaTime()

f32 Timer::ComputeDeltaTime ( )
static

Computes the time elapsed since the last call to this function.

Returns
The delta time in seconds.

◆ DelayTime()

void Timer::DelayTime ( f32 seconds)
static

Delays execution for a specified number of seconds.

Parameters
secondsThe amount of time to delay.

◆ GetTimeSinceLoad()

f32 Timer::GetTimeSinceLoad ( )
static

Gets the time in seconds since the timer was initialized.

Returns
Time since initialization in seconds.

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