Expand description
management of the relation between time and slots
warning: assumes thread_count >= 1, t0_millis >= 1, t0_millis % thread_count == 0
Functionsยง
- get_
block_ slot_ timestamp - Gets timestamp in milliseconds for given slot.
- get_
closest_ slot_ to_ timestamp - TODO DOC
- get_
current_ latest_ block_ slot - Returns the thread and block slot index of the current block slot (inclusive), if any happened yet
- get_
latest_ block_ slot_ at_ timestamp - Returns the thread and block period index of the latest block slot at a given timestamp (inclusive), if any happened
- slot_
count_ in_ range - Counts the number of slots in a slot range [a, b)
- time_
range_ to_ slot_ range - Turns an
MassaTimerange [start, end) with optional start/end to aSlotrange [start, end) with optional start/end