Point Cloud Library (PCL)  1.5.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
pcl::ScopeTime Class Reference

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

#include <pcl/common/time.h>

Inheritance diagram for pcl::ScopeTime:
Inheritance graph
[legend]
Collaboration diagram for pcl::ScopeTime:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ScopeTime (const char *title)
 ScopeTime ()
 ~ScopeTime ()
double getTime ()
 Retrieve the time in milliseconds spent since the last call to reset().
double getTimeSeconds ()
 Retrieve the time in seconds spent since the last call to reset().
void reset ()
 Reset the stopwatch to 0.

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 107 of file time.h.


Constructor & Destructor Documentation

pcl::ScopeTime::ScopeTime ( const char *  title) [inline]

Definition at line 110 of file time.h.

Definition at line 116 of file time.h.

Definition at line 121 of file time.h.


Member Function Documentation

double pcl::StopWatch::getTime ( ) [inline, inherited]

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

Definition at line 68 of file time.h.

double pcl::StopWatch::getTimeSeconds ( ) [inline, inherited]

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

Definition at line 76 of file time.h.

void pcl::StopWatch::reset ( ) [inline, inherited]

Reset the stopwatch to 0.

Definition at line 83 of file time.h.


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