HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nanovdb::CpuTimer Class Reference

#include <CpuTimer.h>

Public Member Functions

 CpuTimer ()
 Default constructor. More...
 
 CpuTimer (const std::string &msg, std::ostream &os=std::cerr)
 Constructor that starts the timer. More...
 
void start (const std::string &msg, std::ostream &os=std::cerr)
 Start the timer. More...
 
template<typename AccuracyT = std::chrono::milliseconds>
auto elapsed ()
 elapsed time (since start) in miliseconds More...
 
template<typename AccuracyT = std::chrono::milliseconds>
void stop (std::ostream &os=std::cerr)
 stop the timer More...
 
template<typename AccuracyT = std::chrono::milliseconds>
void restart (const std::string &msg, std::ostream &os=std::cerr)
 stop and start the timer More...
 

Detailed Description

Definition at line 18 of file CpuTimer.h.

Constructor & Destructor Documentation

nanovdb::CpuTimer::CpuTimer ( )
inline

Default constructor.

Definition at line 23 of file CpuTimer.h.

nanovdb::CpuTimer::CpuTimer ( const std::string msg,
std::ostream &  os = std::cerr 
)
inline

Constructor that starts the timer.

Parameters
msgstring message to be printed when timer is started
osoutput stream for the message above

Definition at line 28 of file CpuTimer.h.

Member Function Documentation

template<typename AccuracyT = std::chrono::milliseconds>
auto nanovdb::CpuTimer::elapsed ( )
inline

elapsed time (since start) in miliseconds

Definition at line 41 of file CpuTimer.h.

template<typename AccuracyT = std::chrono::milliseconds>
void nanovdb::CpuTimer::restart ( const std::string msg,
std::ostream &  os = std::cerr 
)
inline

stop and start the timer

Template Parameters
AccuracyTTemplate parameter defining the accuracy of the reported times
Parameters
msgstring message to be printed when timer is started
osoutput stream for the message above

Definition at line 72 of file CpuTimer.h.

void nanovdb::CpuTimer::start ( const std::string msg,
std::ostream &  os = std::cerr 
)
inline

Start the timer.

Parameters
msgstring message to be printed when timer is started
osoutput stream for the message above

Definition at line 33 of file CpuTimer.h.

template<typename AccuracyT = std::chrono::milliseconds>
void nanovdb::CpuTimer::stop ( std::ostream &  os = std::cerr)
inline

stop the timer

Template Parameters
AccuracyTTemplate parameter defining the accuracy of the reported times
Parameters
osoutput stream for the message above

Definition at line 51 of file CpuTimer.h.


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