HephAudio v3.0.6
A cross-platform C++ library for recording, playing, and processing audio on Windows, Android, Linux, iOS, and macOS.
Loading...
Searching...
No Matches
Heph::Stopwatch Class Referencefinal

class for measuring time. More...

#include <Stopwatch.h>

Public Member Functions

 Stopwatch ()
 
void Reset ()
 
double DeltaTime () const
 
double DeltaTime (double prefix) const
 

Static Public Member Functions

static StopwatchGetInstance () noexcept
 gets the instance that's local to the current thread.
 

Detailed Description

class for measuring time.

Constructor & Destructor Documentation

◆ Stopwatch()

Heph::Stopwatch::Stopwatch ( )

creates a new instance and initializes it with default values.

Member Function Documentation

◆ Reset()

void Heph::Stopwatch::Reset ( )

restarts the stopwatch.

◆ DeltaTime() [1/2]

double Heph::Stopwatch::DeltaTime ( ) const

gets the elapsed time since the last reset in seconds.

◆ DeltaTime() [2/2]

double Heph::Stopwatch::DeltaTime ( double prefix) const

gets the elapsed time since the last reset.

Parameters
prefixthe desired metric prefix.