Skip to main content

epoch_offset

Function epoch_offset 

Source
pub fn epoch_offset() -> u64
Expand description

Returns the current epoch offset in milliseconds.

The epoch offset is the base Unix timestamp used for time simulation. If not previously set, generates and caches a new random value.

ยงPanics

  • If the EPOCH_OFFSET RwLock fails to read from or write to
  • If SIMULATOR_EPOCH_OFFSET is set but cannot be parsed as a u64
  • If SIMULATOR_EPOCH_MIN and SIMULATOR_EPOCH_MAX are not both set when either is provided
  • If SIMULATOR_EPOCH_MIN or SIMULATOR_EPOCH_MAX cannot be parsed as u64
  • If SIMULATOR_EPOCH_MIN is greater than SIMULATOR_EPOCH_MAX
  • If SIMULATOR_EPOCH_RANGE_PROFILE is set to an unsupported value