pub struct DeterministicGatewayClock { /* private fields */ }Expand description
Thread-safe WallClock that advances by a fixed step on each observation.
The clock starts at start_ms and advances by step_ms after every read,
producing reproducible observations without consulting ambient host time.
Implementations§
Source§impl DeterministicWallClock
impl DeterministicWallClock
Sourcepub const fn new(start_ms: u64, step_ms: u64) -> DeterministicWallClock
pub const fn new(start_ms: u64, step_ms: u64) -> DeterministicWallClock
Builds a deterministic clock with an initial Unix-millisecond value and fixed step.
Trait Implementations§
Source§impl Clone for DeterministicWallClock
impl Clone for DeterministicWallClock
Source§fn clone(&self) -> DeterministicWallClock
fn clone(&self) -> DeterministicWallClock
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeterministicWallClock
impl Debug for DeterministicWallClock
Auto Trait Implementations§
impl !Freeze for DeterministicWallClock
impl RefUnwindSafe for DeterministicWallClock
impl Send for DeterministicWallClock
impl Sync for DeterministicWallClock
impl Unpin for DeterministicWallClock
impl UnsafeUnpin for DeterministicWallClock
impl UnwindSafe for DeterministicWallClock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more