timer Namespace Reference

Functions

std::chrono::high_resolution_clock::time_point now ()
 Get current time. More...
 
float elapsed (std::chrono::high_resolution_clock::time_point &tic, bool reset=false)
 Get elapsed time in seconds. More...
 
void reset (std::chrono::high_resolution_clock::time_point &tic, float *cumul=nullptr)
 Dump current time and reset it afterwards. More...
 

Function Documentation

◆ elapsed()

float timer::elapsed ( std::chrono::high_resolution_clock::time_point &  tic,
bool  reset = false 
)
inline

Get elapsed time in seconds.

Parameters
[in]ticstart time

◆ now()

std::chrono::high_resolution_clock::time_point timer::now ( )
inline

Get current time.

◆ reset()

void timer::reset ( std::chrono::high_resolution_clock::time_point &  tic,
float *  cumul = nullptr 
)
inline

Dump current time and reset it afterwards.

Parameters
[in]ticstart time