And there's a third way for libevent to see a big jump forward in
time: if the program calls event_base_loop() sporadically, it is free
to wait as long as it wants between invocations.
So, what's the right behavior for periodic events in these cases? If
there is an event that's supposed to run every 5 seconds, and time has
jumped forward by 16 seconds, it seems reasonable to run the event 1
time, or maybe even 3 times... but if time has jumped forward by one
day, it seems unlikely that the programmer really wants us to run the
event 17280 times.
Perhaps this argues for a cap on how far into the past we should be
willing to reschedule a periodic event, or how many "missed firings"
we'll compensate for before we drop some on the floor?