SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::Timer Class Reference

#include <Timer.hpp>

Public Member Functions

 Timer ()
float Elapsed () const
 Seconds since construction or the last Reset().
void Reset ()
 Restarts the clock at zero.

Detailed Description

Wall-clock stopwatch built on std::chrono. Application keeps one for frame delta time.

Definition at line 10 of file Timer.hpp.

Constructor & Destructor Documentation

◆ Timer()

Sleak::Timer::Timer ( )

Definition at line 4 of file Timer.cpp.

Member Function Documentation

◆ Elapsed()

float Sleak::Timer::Elapsed ( ) const

Seconds since construction or the last Reset().

Definition at line 13 of file Timer.cpp.

◆ Reset()

void Sleak::Timer::Reset ( )

Restarts the clock at zero.

Definition at line 8 of file Timer.cpp.