Skip to main content

Module dst

Module dst 

Source
Expand description

Deterministic simulation testing (DST) seam for network async primitives.

Re-exports time-related async primitives so every call site in nautilus-network routes through one cfg-gated location. Under simulation + cfg(madsim), re-exports from madsim::time so waits and timeouts advance with madsim’s virtual clock. Otherwise re-exports from tokio::time.

Instant is routed the same way so that now() reads and sleep/timeout waits share a single clock base. Using tokio::time::Instant on normal builds keeps the seam compatible with #[tokio::test(start_paused = true)] tests that drive time via tokio::time::advance.

nautilus-network sits below nautilus-common in the dependency graph and cannot import from nautilus_common::live::dst, which is why this helper is crate-local.

Modules§

time