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;
static uint32_t cf_clepoch_seconds()
cf_atomic64 cf_atomic_clock
void cf_set_wait_timespec(int ms_wait, struct timespec *tp)
static void CF_TIMESPEC_ADD_MS(struct timespec *ts, uint ms)
cf_clock cf_secs_since_clepoch()
cf_clock cf_get_seconds()
static cf_clock CF_TIMESPEC_TO_US(struct timespec ts)
static cf_clock CF_TIMESPEC_TO_MS(struct timespec ts)
cf_clock cf_clock_getabsolute()
static cf_clock CF_TIMESPEC_TO_MS_P(struct timespec *ts)
static uint32_t cf_server_void_time_to_ttl(uint32_t server_void_time)
static int clock_gettime(int clock_type, struct timespec *p_ts)