#include <chrono>
Go to the source code of this file.
Macro Definition Documentation
#define DEG2RAD (M_PI/180.0) |
#define MSF_ERROR_STREAM |
( |
|
x | ) |
std::cerr<<"\033[1;31m[ERROR] "<<x<<"\033[0;0m"<<std::endl; |
#define MSF_ERROR_STREAM_COND |
( |
|
cond, |
|
|
|
x |
|
) |
| |
Value:do \
{ \
{ \
MSF_ERROR_STREAM(x); \
} \
} while(0)
#define MSF_ERROR_STREAM_ONCE |
( |
|
x | ) |
|
Value:do \
{ \
static bool __log_stream_once__hit__ = false; \
{ \
__log_stream_once__hit__ = true; \
MSF_ERROR_STREAM(x); \
} \
} while(0)
#define MSF_ERROR_STREAM_THROTTLE |
( |
|
rate, |
|
|
|
x |
|
) |
| |
Value:do \
{ \
static double __log_stream_throttle__last_hit__ = 0.0; \
std::chrono::time_point<std::chrono::system_clock> __log_stream_throttle__now__ = \
std::chrono::system_clock::now(); \
if (
MSF_UNLIKELY(__log_stream_throttle__last_hit__ + rate <= \
std::chrono::duration_cast<std::chrono::seconds>(\
__log_stream_throttle__now__.time_since_epoch()).count())) \
{ \
__log_stream_throttle__last_hit__ = \
std::chrono::duration_cast<std::chrono::seconds>\
(__log_stream_throttle__now__.time_since_epoch()).count(); \
MSF_ERROR_STREAM(x); \
} \
} while(0)
#define MSF_INFO_STREAM |
( |
|
x | ) |
std::cerr<<"\033[0;0m[INFO] "<<x<<"\033[0;0m"<<std::endl; |
#define MSF_INFO_STREAM_COND |
( |
|
cond, |
|
|
|
x |
|
) |
| |
Value:do \
{ \
{ \
MSF_INFO_STREAM(x); \
} \
} while(0)
#define MSF_INFO_STREAM_ONCE |
( |
|
x | ) |
|
Value:do \
{ \
static bool __log_stream_once__hit__ = false; \
{ \
__log_stream_once__hit__ = true; \
MSF_INFO_STREAM(x); \
} \
} while(0)
#define MSF_LIKELY |
( |
|
x | ) |
__builtin_expect((x),1) |
#define MSF_LOG_STREAM_THROTTLE |
( |
|
rate, |
|
|
|
x |
|
) |
| |
Value:do \
{ \
static double __log_stream_throttle__last_hit__ = 0.0; \
std::chrono::time_point<std::chrono::system_clock> __log_stream_throttle__now__ = \
std::chrono::system_clock::now(); \
if (
MSF_UNLIKELY(__log_stream_throttle__last_hit__ + rate <= \
std::chrono::duration_cast<std::chrono::seconds>( \
__log_stream_throttle__now__.time_since_epoch()).count())) \
{ \
__log_stream_throttle__last_hit__ = std::chrono::duration_cast< \
std::chrono::seconds>(__log_stream_throttle__now__.time_since_epoch()).count(); \
MSF_INFO_STREAM(x); \
} \
} while(0)
#define MSF_UNLIKELY |
( |
|
x | ) |
__builtin_expect((x),0) |
#define MSF_WARN_STREAM |
( |
|
x | ) |
std::cerr<<"\033[0;33m[WARN] "<<x<<"\033[0;0m"<<std::endl; |
#define MSF_WARN_STREAM_COND |
( |
|
cond, |
|
|
|
x |
|
) |
| |
Value:do \
{ \
{ \
MSF_WARN_STREAM(x); \
} \
} while(0)
#define MSF_WARN_STREAM_ONCE |
( |
|
x | ) |
|
Value:do \
{ \
static bool __log_stream_once__hit__ = false; \
{ \
__log_stream_once__hit__ = true; \
MSF_WARN_STREAM(x); \
} \
} while(0)
#define MSF_WARN_STREAM_THROTTLE |
( |
|
rate, |
|
|
|
x |
|
) |
| |
Value:do \
{ \
static double __log_stream_throttle__last_hit__ = 0.0; \
std::chrono::time_point<std::chrono::system_clock> __log_stream_throttle__now__ = \
std::chrono::system_clock::now(); \
if (
MSF_UNLIKELY(__log_stream_throttle__last_hit__ + rate <= \
std::chrono::duration_cast<std::chrono::seconds>( \
__log_stream_throttle__now__.time_since_epoch()).count())) \
{ \
__log_stream_throttle__last_hit__ = \
std::chrono::duration_cast<std::chrono::seconds>( \
__log_stream_throttle__now__.time_since_epoch()).count(); \
MSF_WARN_STREAM(x); \
} \
} while(0)
Value:"["<<std::setprecision(3)<<(
q).w()<<
", "<<(
q).x()<<
", "<< \
#define UNUSED |
( |
|
x | ) |
(void)x; |
#define UNUSEDPARAM |
( |
|
x | ) |
x |