27 #ifndef TIME_INTERNAL_H_INCLUDED_
28 #define TIME_INTERNAL_H_INCLUDED_
30 #include "event2/event-config.h"
31 #include "evconfig-private.h"
33 #ifdef EVENT__HAVE_MACH_MACH_TIME_H
35 #include <mach/mach_time.h>
46 #if defined(EVENT__HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
47 #define HAVE_POSIX_MONOTONIC
48 #elif defined(EVENT__HAVE_MACH_ABSOLUTE_TIME)
49 #define HAVE_MACH_MONOTONIC
51 #define HAVE_WIN32_MONOTONIC
53 #define HAVE_FALLBACK_MONOTONIC
56 long evutil_tv_to_msec_(
const struct timeval *tv);
58 void evutil_usleep_(
const struct timeval *tv);
61 typedef ULONGLONG (WINAPI *ev_GetTickCount_func)(void);
66 #ifdef HAVE_MACH_MONOTONIC
67 struct mach_timebase_info mach_timebase_units;
70 #ifdef HAVE_POSIX_MONOTONIC
74 #ifdef HAVE_WIN32_MONOTONIC
75 ev_GetTickCount_func GetTickCount64_fn;
76 ev_GetTickCount_func GetTickCount_fn;
77 ev_uint64_t last_tick_count;
78 ev_uint64_t adjust_tick_count;
80 ev_uint64_t first_tick;
81 ev_uint64_t first_counter;
82 double usec_per_count;
83 int use_performance_counter;
86 struct timeval adjust_monotonic_clock;
87 struct timeval last_time;
Definition: time-internal.h:64