Loading...
Searching...
No Matches
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 std::string &title="")
| ~ScopeTime ()
Public Member Functions inherited from pcl::StopWatch
| StopWatch ()=default
| Constructor.
double | getTime () const
| Retrieve the time in milliseconds spent since the last call to reset().
double | getTimeSeconds () const
| Retrieve the time in seconds spent since the last call to reset().
void | reset ()
| Reset the stopwatch to 0.

## Additional Inherited Members

Protected Attributes inherited from pcl::StopWatch
std::chrono::time_point< std::chrono::steady_clock > | start_time_ = std::chrono::steady_clock::now()

## 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
}
pcl::ScopeTime
Class to measure the time spent in a scope.
Definition time.h:106

Definition at line 105 of file time.h.

## Constructor & Destructor Documentation

## ScopeTime()

pcl::ScopeTime::ScopeTime | ( | const std::string & | title = `""` | ) |

inline

Definition at line 108 of file time.h.

## ~ScopeTime()

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

inline

Definition at line 113 of file time.h.

References pcl::StopWatch::getTime().

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

- pcl/common/time.h