VisionWorks Toolkit Reference

December 18, 2015 | 1.2 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvx::Timer Class Reference

Detailed Description

Timer class interface.

Sample code

nvx::Timer procTimer;
procTimer.tic();
const double proc_ms = procTimer.toc();
std::cout << "Processing Time : " << proc_ms << " ms" << std::endl;

Definition at line 34 of file nvx_timer.hpp.

Public Member Functions

void tic ()
 Starts (or restarts) timer. More...
 
 Timer (bool _dumpStatistics=false, const char *_name="")
 Timer class constructor. More...
 
double toc ()
 Returns the elapsed time since the most recent tic() function call. More...
 
 ~Timer ()
 Destructor. More...
 

Constructor & Destructor Documentation

nvx::Timer::Timer ( bool  _dumpStatistics = false,
const char *  _name = "" 
)

Timer class constructor.

Parameters
[in]_dumpStatisticsSpecifies a flag variable that controls whether to print timer statistics when it's destructor is called.
[in]_nameSpecifies the label of the timer. If _dumpStatistics is true, this label prints in the log when the timer object desctructor is called.
nvx::Timer::~Timer ( )

Destructor.

Member Function Documentation

void nvx::Timer::tic ( )

Starts (or restarts) timer.

double nvx::Timer::toc ( )

Returns the elapsed time since the most recent tic() function call.

Returns
The elapsed time since the most recent call to the tic() function (in ms).

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