Skip to main content

PocketIcTimeExt

Trait PocketIcTimeExt 

Source
pub trait PocketIcTimeExt {
    // Required methods
    fn tick_n(&self, times: usize);
    fn current_time_nanos(&self) -> u64;
    fn restore_time_nanos(&self, nanos_since_epoch: u64);
}
Expand description

Multi-step time helpers that add test policy beyond PocketIC’s primitives.

Required Methods§

Source

fn tick_n(&self, times: usize)

Advance PocketIC by a fixed number of execution rounds.

Source

fn current_time_nanos(&self) -> u64

Capture PocketIC wall-clock time as nanoseconds since the Unix epoch.

Source

fn restore_time_nanos(&self, nanos_since_epoch: u64)

Restore wall-clock and certified time from one captured value.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§