Shiokaze Framework
A research-oriented fluid solver for computer graphics
scoped_timer Class Reference

Timer designed to calculate the timings within scope. More...

#include <scoped_timer.h>

Public Member Functions

 scoped_timer (std::string master_name="", std::string secondary_name="")
 Cnstructor. More...
 
 scoped_timer (const credit *cr, std::string secondary_name="")
 Constructor. More...
 
virtual ~scoped_timer ()
 Default destructor for scoped_timer.
 
void tick ()
 Start recording time.
 
double tock (std::string subname="")
 Stop recording time. More...
 
std::string stock (std::string subname="")
 Stop recording time and return time string. More...
 

Detailed Description

Timer designed to calculate the timings within scope.

Constructor & Destructor Documentation

◆ scoped_timer() [1/2]

scoped_timer::scoped_timer ( std::string  master_name = "",
std::string  secondary_name = "" 
)

Cnstructor.

Parameters
[in]master_nameMaster name.
[in]secondary_nameSecondary name.

◆ scoped_timer() [2/2]

scoped_timer::scoped_timer ( const credit cr,
std::string  secondary_name = "" 
)

Constructor.

Parameters
[in]crPoiter to an instance of credit.
[in]secondary_nameSecondary name.

Member Function Documentation

◆ stock()

std::string scoped_timer::stock ( std::string  subname = "")

Stop recording time and return time string.

Parameters
[in]subnameSubname.
Returns
Human readable timing information.

◆ tock()

double scoped_timer::tock ( std::string  subname = "")

Stop recording time.

Parameters
[in]subnameSubname.
Returns
Time in milliseconds.

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