]> granicus.if.org Git - libevent/commitdiff
In the 2.1 branch, let's try out lazy gettimeofday/clock_gettime comparison
authorNick Mathewson <nickm@torproject.org>
Tue, 8 Mar 2011 04:01:54 +0000 (23:01 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 8 Mar 2011 04:01:54 +0000 (23:01 -0500)
For now, we'll only check for gettimeofday jumps once every 5 seconds.
Let's see how that works.

This reverts commit 5209fadfd07af3f3379ac607582c37933b33e044.

event.c

diff --git a/event.c b/event.c
index 1173d037a9b18a3c907aab9ff25955104694d45b..1496e2be658f9c966012c426139ed7fd095c5d4b 100644 (file)
--- a/event.c
+++ b/event.c
@@ -333,7 +333,7 @@ detect_monotonic(void)
 
 /* How often (in seconds) do we check for changes in wall clock time relative
  * to monotonic time?  Set this to -1 for 'never.' */
-#define CLOCK_SYNC_INTERVAL -1
+#define CLOCK_SYNC_INTERVAL 5
 
 /** Set 'tp' to the current time according to 'base'.  We must hold the lock
  * on 'base'.  If there is a cached time, return it.  Otherwise, use