38 #define timerclear(a) \
39 (a)->tv_set = 0; (a)->tv_usec = 0
43 #define timeradd(a, b, result) \
45 (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \
46 (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \
47 if ((result)->tv_usec >= 1000000L) { \
49 (result)->tv_usec -= 1000000L; \
55 #define timersub(a, b, result) \
57 (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \
58 (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \
59 if ((result)->tv_usec < 0) { \
61 (result)->tv_usec += 1000000L; \
146 static void setOffset(
const struct timeval &tv);
152 static const struct timeval&
getOffset();
182 static double toDouble(
const timeval &val);
195 static double _rating;
201 static bool _modify_clock;
208 static struct timeval _offset;
209 static bool _offset_init;