]> arthur.barton.de Git - netatalk.git/blobdiff - libevent/event-internal.h
Update libevent to 2.0.12
[netatalk.git] / libevent / event-internal.h
index e3da33da724ed8ac21f68b30931ee00682d19e3e..12ca8bc194d09a9498cdb7c4c85c98620d7fdc9f 100644 (file)
@@ -32,6 +32,7 @@ extern "C" {
 #endif
 
 #include "event2/event-config.h"
+#include <time.h>
 #include <sys/queue.h>
 #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 */