time.h File Reference
#include <cmath>
#include "pcl/win32_macros.h"
#include <sys/time.h>
#include "pcl/common/time.hpp"
Go to the source code of this file.
Classes |
class | pcl::ScopeTime |
| Class to measure the time spent in a scope. More...
|
Namespaces |
namespace | pcl |
Defines |
#define | DO_EVERY(secs, code) DO_EVERY_TS(secs, pcl::getTime(), code) |
| Executes code, only if secs are gone since last exec.
|
#define | DO_EVERY_TS(secs, currentTime, code) |
| Executes code, only if secs are gone since last exec.
|
#define | MEASURE_FUNCTION_TIME ScopeTime scopeTime(__func__) |
Functions |
double | pcl::getTime () |
Define Documentation
#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 100 of file time.h.
#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 84 of file time.h.
#define MEASURE_FUNCTION_TIME ScopeTime scopeTime(__func__) |