summaryrefslogtreecommitdiff
path: root/src/or/rephist.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2007-10-04 16:21:58 +0000
committerNick Mathewson <nickm@torproject.org>2007-10-04 16:21:58 +0000
commit6f7847b378a67ad29cdeb9a3c1304de474bf46c0 (patch)
tree8f7b10020d50f6a3175a7c9e076da649c357641f /src/or/rephist.c
parentcc7e0f62b512f4b9446ba3ef2cdb702ee14ad82f (diff)
downloadtor-6f7847b378a67ad29cdeb9a3c1304de474bf46c0.tar.gz
tor-6f7847b378a67ad29cdeb9a3c1304de474bf46c0.zip
r15530@catbus: nickm | 2007-10-04 12:16:27 -0400
Add a bunch of function documentation; clean up a little code; fix some XXXXs; tag the nonsensical EXTRAINFO_PURPOSE_GENERAL as nonsesnse; note another bit of "do not cache special routers" code to nuke. svn:r11761
Diffstat (limited to 'src/or/rephist.c')
-rw-r--r--src/or/rephist.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/rephist.c b/src/or/rephist.c
index f065ad17d2..f039d45e1a 100644
--- a/src/or/rephist.c
+++ b/src/or/rephist.c
@@ -384,7 +384,8 @@ get_stability(or_history_t *hist, time_t when)
return total / total_weights;
}
-/** DOCDOC */
+/** Helper: Return the weighted percent-of-time-online of the router with
+ * history <b>hist</b>. */
static double
get_weighted_fractional_uptime(or_history_t *hist, time_t when)
{
@@ -413,7 +414,8 @@ rep_hist_get_stability(const char *id, time_t when)
return get_stability(hist, when);
}
-/** DOCDOC */
+/** Return an estimated percent-of-time-online for the router whose identity
+ * digest is <b>id</b>. Return 0 if the router is unknown. */
double
rep_hist_get_weighted_fractional_uptime(const char *id, time_t when)
{