Use Libevent 2.0's periodic timers where available.
commitad2d8ac073e576f538813a75183a3a8a477dfd5b
authorNick Mathewson <nickm@torproject.org>
Fri, 25 Jun 2010 19:31:46 +0000 (25 15:31 -0400)
committerNick Mathewson <nickm@torproject.org>
Fri, 25 Jun 2010 19:31:46 +0000 (25 15:31 -0400)
tree2b26c6794a1a25e0aae82ba33680ffe0fbddd2d6
parentdeb9e4aff7347860d5cb41426e4c02a4efc16253
Use Libevent 2.0's periodic timers where available.

These timers behave better with non-monotonic clocks than our old
ones, and also try harder to make once-per-second events get called
one second apart, rather than one-plus-epsilon seconds apart.

This fixes bug 943 for everybody using Libevent 2.0 or later.
changes/once_per_sec [new file with mode: 0644]
src/common/compat_libevent.c
src/common/compat_libevent.h
src/or/main.c