24 #include <citrusleaf/cf_atomic.h>
25 #include <citrusleaf/cf_types.h>
33 #include <bits/time.h>
41 #include <citrusleaf/cf_clock_win.h>
68 uint64_t r1 = ts->tv_nsec;
70 uint64_t r2 = ts->tv_sec;
76 uint64_t r1 = ts.tv_nsec;
78 uint64_t r2 = ts.tv_sec;
84 uint64_t r1 = ts.tv_nsec;
86 uint64_t r2 = ts.tv_sec;
92 ts->tv_sec += ms / 1000;
93 ts->tv_nsec += (ms % 1000) * 1000000;
94 if (ts->tv_nsec > 1000000000) {
96 ts->tv_nsec -= 1000000000;
103 gettimeofday(&tv, NULL);
115 if (server_void_time == 0) {
126 return server_void_time > now ? server_void_time - now : 1;