SLProject 4.0.000
HighResTimer Class Reference

High Resolution Timer class using C++11. More...

#include <HighResTimer.h>

Public Member Functions

 HighResTimer ()
 
void start ()
 
void stop ()
 
float elapsedTimeInSec ()
 
float elapsedTimeInMilliSec ()
 
int64_t elapsedTimeInMicroSec ()
 

Static Public Member Functions

static void callAfterSleep (int milliSec, const function< void(void)> &callbackFunc)
 

Private Attributes

HighResTimePoint _timePoint1
 high precision start time point More...
 
HighResTimePoint _timePoint2
 high precision end time point More...
 

Detailed Description

High Resolution Timer class using C++11.

High Resolution Timer that is able to measure the elapsed time with 1 micro-second accuracy.

Constructor & Destructor Documentation

◆ HighResTimer()

HighResTimer::HighResTimer ( )
inline

Member Function Documentation

◆ callAfterSleep()

static void HighResTimer::callAfterSleep ( int  milliSec,
const function< void(void)> &  callbackFunc 
)
inlinestatic

◆ elapsedTimeInMicroSec()

int64_t HighResTimer::elapsedTimeInMicroSec ( )
inline

◆ elapsedTimeInMilliSec()

float HighResTimer::elapsedTimeInMilliSec ( )
inline

◆ elapsedTimeInSec()

float HighResTimer::elapsedTimeInSec ( )
inline

◆ start()

void HighResTimer::start ( )
inline

◆ stop()

void HighResTimer::stop ( )
inline

Member Data Documentation

◆ _timePoint1

HighResTimePoint HighResTimer::_timePoint1
private

high precision start time point

◆ _timePoint2

HighResTimePoint HighResTimer::_timePoint2
private

high precision end time point


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