Function massa_models::timeslots::time_range_to_slot_range
source · pub fn time_range_to_slot_range(
thread_count: u8,
t0: MassaTime,
genesis_timestamp: MassaTime,
start_time: Option<MassaTime>,
end_time: Option<MassaTime>,
) -> Result<(Option<Slot>, Option<Slot>), ModelsError>
Expand description
Turns an MassaTime
range [start, end) with optional start/end to a Slot
range [start, end) with optional start/end
§Arguments
thread_count
: number of threads.t0
: time in milliseconds between two periods in the same thread.genesis_timestamp
: when the blockclique first started, in millisecondsstart_time
: optional start timeend_time
: optional end time
§Returns
(Option<Slot>, Option<Slot>)
pair of options representing the start (included) and end (excluded) slots
or ConsensusError
on error