Trait netem_trace::DelayTrace
source · pub trait DelayTrace {
// Required method
fn next_delay(&mut self) -> Option<(Delay, Duration)>;
}Expand description
This is a trait that represents a trace of delays.
The trace is a sequence of (delay, duration) pairs.
The delay describes how long a packet is delayed when going through.
The duration is the time that the delay lasts.
For example, if the sequence is [(10ms, 1s), (20ms, 2s), (30ms, 3s)], then the delay will be 10ms for 1s, then 20ms for 2s, then 30ms for 3s.
The next_delay function either returns the next delay and its duration in the sequence, or None if the trace goes to end.