5 #include "core/common.h"
7 #define USEC_PER_SEC 1000000ull
8 #define SEC_PER_DAY 86400
9 #define DAYS_PER_WEEK 7
10 #define time_after(a, b) ((int64_t)(b) - (int64_t)(a) < 0)
11 #define time_after_eq(a, b) ((int64_t)(b) - (int64_t)(a) <= 0)
13 //#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
15 #define STRINGIZE(x) #x
16 #define STRINGIZE_VALUE_OF(x) STRINGIZE(x)
18 #define API __attribute__ ((visibility ("default")))
20 #define STATIC_ASSERT(CONDITION,MESSAGE) typedef char static_assert_\
21 ##MESSAGE[(CONDITION)?0:-1]
23 #define CHECK_RET(ret, func_name) \
26 _E(func_name" failed: error code %d", ret); \
31 __attribute__ ((unused)) static time_t getSecTime()
34 clock_gettime(CLOCK_MONOTONIC, &ts);
38 #endif /* _LOGD_MACRO_H_ */