OxL Reference

method net.latency

One-way latency of every message, uniform in lo..=hi (jitter = hi - lo). The Standard writes net.latency(10ms..300ms) (a Range<Duration>, or 10ms..=300ms, D-3563); the two-argument form net.latency(10ms, 300ms) is kept (D-4109).

Example:

oxl✓ checked in CI
use std.test { net }

test sim "slow network" seeds 1..=2 {
  net.latency(10ms..300ms)
}
pub(api) static fn latency(bounds: Dur | Range<Dur> | RangeInclusive<Dur>, hi: Dur = 0ms)

Since. 1.0.0-beta

Parameters

NameType
boundsDur | Range<Dur> | RangeInclusive<Dur>
hiDur = 0ms

Effects

none declared (pure unless the body says otherwise)

Defined in: std/test/test.oxl:95

See also