TimeUtil.h File Reference
#include <ArmarXCore/interface/core/TimeServerInterface.h>
#include <IceUtil/Time.h>
#include <chrono>
+ Include dependency graph for TimeUtil.h:

Go to the source code of this file.

Classes

class  TimeUtil
 provides utility functions for getting the current time More...
 

Namespaces

 armarx
 This file offers overloads of toIce() and fromIce() functions for STL container types.
 

Macros

#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)   if((IceUtil::Time::now()-name).toMilliSecondsDouble() >= thresholdMs) TIMING_END_COMMENT(name, comment)
 
#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();
 

Enumerations

enum  TimeMode { SystemTime, VirtualTime }
 Time mode to be used. More...
 

Macro Definition Documentation

◆ 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>\
inline IceUtil::Time operator op(IceUtil::Time a, std::chrono::duration<Rep, Period> b)\
{\
return a op IceUtil::Time::microSeconds(std::chrono::duration_cast<std::chrono::microseconds>(b).count());\
}\
template<class Rep, class Period>\
inline IceUtil::Time operator op(std::chrono::duration<Rep, Period> a, IceUtil::Time b)\
{\
return IceUtil::Time::microSeconds(std::chrono::duration_cast<std::chrono::microseconds>(a).count()) op b;\
}

Definition at line 91 of file TimeUtil.h.

armarx::ctrlutil::a
double a(double t, double a0, double j)
Definition: CtrlUtil.h:45
armarx::armem::Time
armarx::core::time::DateTime Time
Definition: forward_declarations.h:13