pub struct BitWheel<T, const NUM_GEARS: usize = DEFAULT_GEARS, const RESOLUTION_MS: u64 = DEFAULT_RESOLUTION_MS, const SLOT_CAP: usize = DEFAULT_SLOT_CAP, const MAX_PROBES: usize = DEFAULT_MAX_PROBES> { /* private fields */ }Implementations§
Source§impl<T, const NUM_GEARS: usize, const RESOLUTION_MS: u64, const SLOT_CAP: usize, const MAX_PROBES: usize> BitWheel<T, NUM_GEARS, RESOLUTION_MS, SLOT_CAP, MAX_PROBES>
impl<T, const NUM_GEARS: usize, const RESOLUTION_MS: u64, const SLOT_CAP: usize, const MAX_PROBES: usize> BitWheel<T, NUM_GEARS, RESOLUTION_MS, SLOT_CAP, MAX_PROBES>
pub fn with_epoch(epoch: Instant) -> Self
pub fn new() -> Self
pub fn boxed() -> Box<Self>
pub fn boxed_with_epoch(epoch: Instant) -> Box<Self>
Sourcepub const fn gear_granularities() -> [u64; NUM_GEARS]
pub const fn gear_granularities() -> [u64; NUM_GEARS]
Useful for deciding how to scale the BitWheel
for your use case such that it satisfies the
timer constraints.
Sourcepub const fn memory_footprint() -> usize
pub const fn memory_footprint() -> usize
Useful for deciding how to scale the BitWheel
for your use case such that it does not take
up a tremendous amount of memory.