pcl::ScopeTime Class Reference
Module common

Class to measure the time spent in a scope. More...

`#include <pcl/common/time.h>`

Inheritance diagram for pcl::ScopeTime:

## Public Member Functions

| ScopeTime (const char *title)
| ScopeTime ()
| ~ScopeTime ()
Public Member Functions inherited from pcl::StopWatch
| StopWatch ()
| Constructor. More...
virtual | ~StopWatch ()
| Destructor. More...
double | getTime ()
| Retrieve the time in milliseconds spent since the last call to reset(). More...
double | getTimeSeconds ()
| Retrieve the time in seconds spent since the last call to reset(). More...
void | reset ()
| Reset the stopwatch to 0. More...

## Additional Inherited Members

Protected Attributes inherited from pcl::StopWatch
boost::posix_time::ptime | start_time_

## Detailed Description

Class to measure the time spent in a scope.

To use this class, e.g. to measure the time spent in a function, just create an instance at the beginning of the function. Example:

{
pcl::ScopeTime t1 ("calculation");
// ... perform calculation here
}

Definition at line 117 of file time.h.

## Constructor & Destructor Documentation

## ScopeTime() [1/2]

pcl::ScopeTime::ScopeTime | ( | const char * | title | ) |

inline

Definition at line 120 of file time.h.

References pcl::StopWatch::start_time_.

## ScopeTime() [2/2]

pcl::ScopeTime::ScopeTime | ( |  | ) |

inline

Definition at line 126 of file time.h.

References pcl::StopWatch::start_time_.

## ~ScopeTime()

pcl::ScopeTime::~ScopeTime | ( |  | ) |

inline

Definition at line 132 of file time.h.

References pcl::StopWatch::getTime().

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

- /build/pcl-qv3n_B/pcl-1.8.1+dfsg1/common/include/pcl/common/time.h