Point Cloud Library (PCL)  1.12.1-dev
List of all members | Public Member Functions | Protected Attributes
pcl::StopWatch Class Reference

Simple stopwatch. More...

#include <pcl/common/time.h>

+ Inheritance diagram for pcl::StopWatch:

Public Member Functions

 StopWatch ()=default
 Constructor. More...
 
double getTime () const
 Retrieve the time in milliseconds spent since the last call to reset(). More...
 
double getTimeSeconds () const
 Retrieve the time in seconds spent since the last call to reset(). More...
 
void reset ()
 Reset the stopwatch to 0. More...
 

Protected Attributes

std::chrono::time_point< std::chrono::steady_clock > start_time_ = std::chrono::steady_clock::now()
 

Detailed Description

Simple stopwatch.

Definition at line 58 of file time.h.

Constructor & Destructor Documentation

◆ StopWatch()

pcl::StopWatch::StopWatch ( )
default

Constructor.

Member Function Documentation

◆ getTime()

double pcl::StopWatch::getTime ( ) const
inline

Retrieve the time in milliseconds spent since the last call to reset().

Definition at line 66 of file time.h.

References start_time_.

Referenced by getTimeSeconds(), and pcl::ScopeTime::~ScopeTime().

◆ getTimeSeconds()

double pcl::StopWatch::getTimeSeconds ( ) const
inline

Retrieve the time in seconds spent since the last call to reset().

Definition at line 74 of file time.h.

References getTime().

Referenced by pcl::registration::FPCSInitialAlignment< PointSource, PointTarget, NormalT, Scalar >::computeTransformation(), and pcl::EventFrequency::event().

◆ reset()

void pcl::StopWatch::reset ( )
inline

Reset the stopwatch to 0.

Definition at line 81 of file time.h.

References start_time_.

Referenced by pcl::EventFrequency::EventFrequency(), and pcl::EventFrequency::reset().

Member Data Documentation

◆ start_time_

std::chrono::time_point<std::chrono::steady_clock> pcl::StopWatch::start_time_ = std::chrono::steady_clock::now()
protected

Definition at line 87 of file time.h.

Referenced by getTime(), and reset().


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