summaryrefslogtreecommitdiff
path: root/src/or/hs_common.c
diff options
context:
space:
mode:
authorGeorge Kadianakis <desnacked@riseup.net>2017-09-12 12:24:10 +0300
committerGeorge Kadianakis <desnacked@riseup.net>2017-09-12 21:17:35 +0300
commitf13ca360c9593fa9dfc94830996329dcb31c2324 (patch)
tree6bbf25a00daf713d83f904ed07d2b6543a0515f0 /src/or/hs_common.c
parentd71a00e91f3921f6bdf160811313e7b32f890b6c (diff)
downloadtor-f13ca360c9593fa9dfc94830996329dcb31c2324.tar.gz
tor-f13ca360c9593fa9dfc94830996329dcb31c2324.zip
prop224: Improve docs in time period funcs.
Diffstat (limited to 'src/or/hs_common.c')
-rw-r--r--src/or/hs_common.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/or/hs_common.c b/src/or/hs_common.c
index 291d8ae8da..f10fc4d5a4 100644
--- a/src/or/hs_common.c
+++ b/src/or/hs_common.c
@@ -235,7 +235,7 @@ get_time_period_length(void)
}
/** Get the HS time period number at time <b>now</b>. If <b>now</b> is not set,
- * we try to get the time ourselves. */
+ * we try to get the time ourselves from a live consensus. */
uint64_t
hs_get_time_period_num(time_t now)
{
@@ -269,22 +269,26 @@ hs_get_time_period_num(time_t now)
}
/** Get the number of the _upcoming_ HS time period, given that the current
- * time is <b>now</b>. */
+ * time is <b>now</b>. If <b>now</b> is not set, we try to get the time from a
+ * live consensus. */
uint64_t
hs_get_next_time_period_num(time_t now)
{
return hs_get_time_period_num(now) + 1;
}
-/* Get the number of the _previous_ HS time period, given that the current
- * time is <b>now</b>. */
+/* Get the number of the _previous_ HS time period, given that the current time
+ * is <b>now</b>. If <b>now</b> is not set, we try to get the time from a live
+ * consensus. */
uint64_t
hs_get_previous_time_period_num(time_t now)
{
return hs_get_time_period_num(now) - 1;
}
-/* Return the start time of the upcoming time period based on <b>now</b>. */
+/* Return the start time of the upcoming time period based on <b>now</b>. If
+ <b>now</b> is not set, we try to get the time ourselves from a live
+ consensus. */
time_t
hs_get_start_time_of_next_time_period(time_t now)
{