8 assert(!gettimeofday((x), NULL)); \
11 #define SET_TIMEOUT(timespec, given_timeout) /* timeout is in ms */ \
13 struct timeval* curr = (struct timeval*)(timespec); \
15 if (given_timeout > 100) { \
16 tout = given_timeout; \
21 curr->tv_sec += (tout / 1000); \
22 curr->tv_usec /= 1000; /* set to ms */ \
23 curr->tv_usec += (tout % 1000); \
24 curr->tv_sec += (curr->tv_usec / 1000); \
25 curr->tv_usec = (curr->tv_usec % 1000); \
26 curr->tv_usec *= 1000000; \
31 /* -- gcc specific vararg macro support ... but its so nice! -- */
33 #define Debug(x, args...) \
36 purple_debug(PURPLE_DEBUG_INFO, "crazychat", x, ## args); \
39 #define Debug(x, args...) do{}while(0)