X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=libevent%2Fevent-internal.h;h=12ca8bc194d09a9498cdb7c4c85c98620d7fdc9f;hb=75cceac7017a24e33d65f917155ad0d8b15ef178;hp=e3da33da724ed8ac21f68b30931ee00682d19e3e;hpb=313b5f94348618d65523c1d8bde1fba9988f040a;p=netatalk.git diff --git a/libevent/event-internal.h b/libevent/event-internal.h index e3da33da..12ca8bc1 100644 --- a/libevent/event-internal.h +++ b/libevent/event-internal.h @@ -32,6 +32,7 @@ extern "C" { #endif #include "event2/event-config.h" +#include #include #include "event2/event_struct.h" #include "minheap-internal.h" @@ -235,9 +236,18 @@ struct event_base { /** Priority queue of events with timeouts. */ struct min_heap timeheap; - /** Stored timeval: used to avoid calling gettimeofday too often. */ + /** Stored timeval: used to avoid calling gettimeofday/clock_gettime + * too often. */ struct timeval tv_cache; +#if defined(_EVENT_HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC) + /** Difference between internal time (maybe from clock_gettime) and + * gettimeofday. */ + struct timeval tv_clock_diff; + /** Second in which we last updated tv_clock_diff, in monotonic time. */ + time_t last_updated_clock_diff; +#endif + #ifndef _EVENT_DISABLE_THREAD_SUPPORT /* threading support */ /** The thread currently running the event_loop for this base */