Point Cloud Library (PCL)  1.14.1-dev
Classes | Namespaces | Macros | Functions
time.h File Reference
#include <chrono>
#include <iostream>
#include <queue>
#include <string>
+ Include dependency graph for time.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Detailed Description

Define methods for measuring time spent in code blocks.

Definition in file time.h.

Classes

class  pcl::StopWatch
 Simple stopwatch. More...
 
class  pcl::ScopeTime
 Class to measure the time spent in a scope. More...
 
class  pcl::EventFrequency
 A helper class to measure frequency of a certain event. More...
 

Namespaces

 pcl
 

Macros

#define MEASURE_FUNCTION_TIME    ScopeTime scopeTime(__func__)
 
#define DO_EVERY_TS(secs, currentTime, code)
 Executes code, only if secs are gone since last exec. More...
 
#define DO_EVERY(secs, code)    DO_EVERY_TS(secs, pcl::getTime(), code)
 Executes code, only if secs are gone since last exec. More...
 

Functions

double pcl::getTime ()
 

Macro Definition Documentation

◆ DO_EVERY

#define DO_EVERY (   secs,
  code 
)     DO_EVERY_TS(secs, pcl::getTime(), code)

Executes code, only if secs are gone since last exec.

Definition at line 209 of file time.h.

◆ DO_EVERY_TS

#define DO_EVERY_TS (   secs,
  currentTime,
  code 
)
Value:
if (1) {\
static double s_lastDone_ = 0.0; \
double s_now_ = (currentTime); \
if (s_lastDone_ > s_now_) \
s_lastDone_ = s_now_; \
if ((s_now_ - s_lastDone_) > (secs)) { \
code; \
s_lastDone_ = s_now_; \
}\
} else \
(void)0

Executes code, only if secs are gone since last exec.

Definition at line 193 of file time.h.

◆ MEASURE_FUNCTION_TIME

#define MEASURE_FUNCTION_TIME    ScopeTime scopeTime(__func__)

Definition at line 181 of file time.h.