diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-11-16 10:40:23 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-11-16 10:40:23 -0500 |
commit | eb721ed2d9f3abc049b92b904f5d47d08bae9311 (patch) | |
tree | 9fdbf01fae557c5d4b9d654297909d4ca47e4b8f /src/or/periodic.c | |
parent | dd00fd0a1f3d9c30d94c00ce7f847298b4494c7d (diff) | |
download | tor-eb721ed2d9f3abc049b92b904f5d47d08bae9311.tar.gz tor-eb721ed2d9f3abc049b92b904f5d47d08bae9311.zip |
Add documentation for periodic event api
Diffstat (limited to 'src/or/periodic.c')
-rw-r--r-- | src/or/periodic.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/or/periodic.c b/src/or/periodic.c index 44e1714cb8..708c0099fb 100644 --- a/src/or/periodic.c +++ b/src/or/periodic.c @@ -12,9 +12,13 @@ #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. + */ static const int MAX_INTERVAL = 10 * 365 * 86400; -/** DOCDOC */ +/** Set the event <b>event</b> to run in <b>next_interval</b> seconds from + * now. */ static void periodic_event_set_interval(periodic_event_item_t *event, time_t next_interval) @@ -65,7 +69,7 @@ periodic_event_dispatch(evutil_socket_t fd, short what, void *data) log_info(LD_GENERAL, "Dispatching %s", event->name); } -/** DOCDOC */ +/** Schedules <b>event</b> to run as soon as possible from now. */ void periodic_event_reschedule(periodic_event_item_t *event) { @@ -92,7 +96,7 @@ periodic_event_launch(periodic_event_item_t *event) periodic_event_dispatch(-1, EV_TIMEOUT, event); } -/** DOCDOC */ +/** Release all storage associated with <b>event</b> */ void periodic_event_destroy(periodic_event_item_t *event) { |