diff options
Diffstat (limited to 'src/or/hs_common.c')
-rw-r--r-- | src/or/hs_common.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/hs_common.c b/src/or/hs_common.c index 75339df6cd..3bf423f855 100644 --- a/src/or/hs_common.c +++ b/src/or/hs_common.c @@ -276,6 +276,14 @@ 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>. */ +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>. */ time_t hs_get_start_time_of_next_time_period(time_t now) |