Nick Mathewson dfd808cbad If time has jumped so we'd reschedule a periodic event in the past, schedule it for the future instead
Fixes an issue reported on libevent-users in the thread "a dead
looping bug when changing system time backward". Previously, if time
jumped forward 1 hour[*] and we had a one-second periodic timer event,
that event would get invoked 3600 times.  That's almost certainly not
what anybody wants.

In a future version of Libevent, we should expose the amount of time
that the callbac kwould have been invoked somehow.

[*] Forward time jumps can happen with nonmonotonic clocks, or with
clocks that jump on suspend/resume.  It can also happen from
Libevent's point of view if the user exits from event_base_loop() and
doesn't call it again for a while.
2012-04-19 18:25:59 -04:00
..
2012-02-10 17:29:53 -05:00
2012-02-10 17:29:53 -05:00
2012-02-10 17:29:53 -05:00
2012-02-10 17:29:53 -05:00
2012-02-10 17:29:53 -05:00
2012-02-10 17:29:53 -05:00
2012-02-10 17:29:53 -05:00
2012-02-10 17:29:53 -05:00
2012-02-10 17:29:53 -05:00
2012-02-10 17:29:53 -05:00
2012-02-10 17:29:53 -05:00
2011-02-22 00:31:56 -05:00
2012-02-10 17:29:53 -05:00
2012-02-10 17:29:53 -05:00