aboutsummaryrefslogtreecommitdiff
path: root/src/or/periodic.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-11-17 08:26:04 -0500
committerNick Mathewson <nickm@torproject.org>2015-11-17 08:26:04 -0500
commit661e5bdbfae8f66a5b12caeb8636e665186bcc55 (patch)
tree706c3a3381b26601c3042adef3839b8c2295146e /src/or/periodic.c
parenteb721ed2d9f3abc049b92b904f5d47d08bae9311 (diff)
downloadtor-661e5bdbfae8f66a5b12caeb8636e665186bcc55.tar.gz
tor-661e5bdbfae8f66a5b12caeb8636e665186bcc55.zip
Changes to 3199 branch based on feedback from special
Diffstat (limited to 'src/or/periodic.c')
-rw-r--r--src/or/periodic.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/or/periodic.c b/src/or/periodic.c
index 708c0099fb..e21b1af37c 100644
--- a/src/or/periodic.c
+++ b/src/or/periodic.c
@@ -12,8 +12,9 @@
#include <event.h>
#endif
-/** We disable any interval greate than this number of seconds, on the ground
- * that it is probably an absolute time mistakenly passed in as a relative time.
+/** We disable any interval greater than this number of seconds, on the
+ * grounds that it is probably an absolute time mistakenly passed in as a
+ * relative time.
*/
static const int MAX_INTERVAL = 10 * 365 * 86400;
@@ -41,6 +42,7 @@ periodic_event_dispatch(evutil_socket_t fd, short what, void *data)
time_t now = time(NULL);
const or_options_t *options = get_options();
+ log_debug(LD_GENERAL, "Dispatching %s", event->name);
int r = event->fn(now, options);
int next_interval = 0;
@@ -63,10 +65,10 @@ periodic_event_dispatch(evutil_socket_t fd, short what, void *data)
next_interval = 1;
}
+ log_debug(LD_GENERAL, "Scheduling %s for %d seconds", event->name,
+ next_interval);
struct timeval tv = { next_interval , 0 };
event_add(event->ev, &tv);
-
- log_info(LD_GENERAL, "Dispatching %s", event->name);
}
/** Schedules <b>event</b> to run as soon as possible from now. */