diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-05-03 10:56:49 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-05-03 12:02:10 -0400 |
commit | 83137275a77eedbf177fbdb298c89a346abe2243 (patch) | |
tree | 62b694baad15a6fee60756909179c791ba9b58e4 /src/or/periodic.c | |
parent | 1d16b7124f8c5cdcd04599aac62fb903862acdee (diff) | |
download | tor-83137275a77eedbf177fbdb298c89a346abe2243.tar.gz tor-83137275a77eedbf177fbdb298c89a346abe2243.zip |
Add update_current_time() calls to periodic and event-driven callbacks
This is part of 26009, where we're going to keep track of the
current time and its jumps without having to do so in
second_elapsed_callback.
Diffstat (limited to 'src/or/periodic.c')
-rw-r--r-- | src/or/periodic.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/or/periodic.c b/src/or/periodic.c index 76aa418b35..92fa677f8f 100644 --- a/src/or/periodic.c +++ b/src/or/periodic.c @@ -14,6 +14,7 @@ #include "or.h" #include "compat_libevent.h" #include "config.h" +#include "main.h" #include "periodic.h" /** We disable any interval greater than this number of seconds, on the @@ -48,6 +49,7 @@ periodic_event_dispatch(mainloop_event_t *ev, void *data) } time_t now = time(NULL); + update_current_time(now); const or_options_t *options = get_options(); // log_debug(LD_GENERAL, "Dispatching %s", event->name); int r = event->fn(now, options); |