tor  master
Data Structures | Functions | Variables
voting_schedule.h File Reference

Header file for voting_schedule.c. More...

#include "or.h"
Include dependency graph for voting_schedule.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  voting_schedule_t
 

Functions

void voting_schedule_recalculate_timing (const or_options_t *options, time_t now)
 
time_t voting_schedule_get_start_of_next_interval (time_t now, int interval, int offset)
 
time_t voting_schedule_get_next_valid_after_time (void)
 

Variables

voting_schedule_t voting_schedule
 

Detailed Description

Header file for voting_schedule.c.

Function Documentation

◆ voting_schedule_get_start_of_next_interval()

time_t voting_schedule_get_start_of_next_interval ( time_t  now,
int  interval,
int  offset 
)

Return the start of the next interval of size interval (in seconds) after now, plus offset. Midnight always starts a fresh interval, and if the last interval of a day would be truncated to less than half its size, it is rolled into the previous interval.

Here is the call graph for this function:

◆ voting_schedule_recalculate_timing()

void voting_schedule_recalculate_timing ( const or_options_t options,
time_t  now 
)

Set voting_schedule to hold the timing for the next vote we should be doing. All type of tor do that because HS subsystem needs the timing as well to function properly.