#include <chrono>
#include <IceUtil/Time.h>
#include <ArmarXCore/interface/core/TimeServerInterface.h>
Go to the source code of this file.
|
| class | TimeUtil |
| | provides utility functions for getting the current time More...
|
| |
|
| #define | GENERATE_TIME_OPERATOR_COMP(op) |
| |
| #define | GENERATE_TIME_OPERATORS_ARITH(op) |
| |
| #define | TIMING_CEND(name, thresholdMs) TIMING_CEND_COMMENT(name, #name, thresholdMs) |
| |
| #define | TIMING_CEND_COMMENT(name, comment, thresholdMs) |
| |
| #define | TIMING_END(name) TIMING_END_COMMENT(name, #name) |
| |
| #define | TIMING_END_COMMENT(name, comment) TIMING_END_COMMENT_STREAM(name, comment, ARMARX_INFO) |
| |
| #define | TIMING_END_COMMENT_STREAM(name, comment, os) |
| |
| #define | TIMING_END_STREAM(name, os) TIMING_END_COMMENT_STREAM(name, #name, os) |
| |
| #define | TIMING_START(name) auto name = IceUtil::Time::now(); |
| |
◆ GENERATE_TIME_OPERATOR_COMP
| #define GENERATE_TIME_OPERATOR_COMP |
( |
|
op | ) |
|
Value: template <class Rep, class Period> \
inline
bool operator op(
IceUtil::Time a, std::chrono::duration<Rep, Period> b) \
{ \
return
a.toMicroSeconds() op std::chrono::duration_cast<std::chrono::microseconds>(b) \
.count(); \
} \
template <class Rep, class Period> \
inline
bool operator op(std::chrono::duration<Rep, Period>
a,
IceUtil::Time b) \
{ \
return std::chrono::duration_cast<std::chrono::microseconds>(
a).count() \
op b.toMicroSeconds(); \
}
Definition at line 73 of file TimeUtil.h.
◆ GENERATE_TIME_OPERATORS_ARITH
| #define GENERATE_TIME_OPERATORS_ARITH |
( |
|
op | ) |
|
Value: template <class Rep, class Period> \
{ \
return
a op IceUtil::Time::microSeconds( \
std::chrono::duration_cast<std::chrono::microseconds>(b).count()); \
} \
template <class Rep, class Period> \
{ \
return IceUtil::Time::microSeconds( \
std::chrono::duration_cast<std::chrono::microseconds>(
a).count()) op b; \
}
Definition at line 93 of file TimeUtil.h.