OpenVDB  3.0.0
Public Member Functions | List of all members
CpuTimer Class Reference

Simple timer for basic profiling. More...

#include <CpuTimer.h>

Public Member Functions

 CpuTimer ()
 Initiate timer. More...
 
void start ()
 Restart timer. More...
 
void start (const std::string &msg)
 Print message and re-start timer. More...
 
void restart (const std::string &msg)
 Stops previous timer, print message and re-start timer. More...
 
double delta () const
 Return Time diference in milliseconds since construction or start was called. More...
 
void stop () const
 Prints time in milliseconds since construction or start was called. More...
 

Detailed Description

Simple timer for basic profiling.

Cputimer timer;
timer.start("My algorithm");
// code to be timed goes here
timer.stop();

Constructor & Destructor Documentation

CpuTimer ( )
inline

Initiate timer.

Member Function Documentation

double delta ( ) const
inline

Return Time diference in milliseconds since construction or start was called.

void restart ( const std::string &  msg)
inline

Stops previous timer, print message and re-start timer.

Note
Should normally be followed by a call to stop()
void start ( )
inline

Restart timer.

Note
Should normally be followed by a call to time()
void start ( const std::string &  msg)
inline

Print message and re-start timer.

Note
Should normally be followed by a call to stop()
void stop ( ) const
inline

Prints time in milliseconds since construction or start was called.


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