pub trait LatencyModel: Send + Sync {
// Required methods
fn get_latency_ns(&self) -> u64;
fn avg_latency_ns(&self) -> u64;
fn clone_box(&self) -> Box<dyn LatencyModel>;
}Expand description
Trait for latency models
Required Methods§
Sourcefn get_latency_ns(&self) -> u64
fn get_latency_ns(&self) -> u64
Get the next latency value in nanoseconds
Sourcefn avg_latency_ns(&self) -> u64
fn avg_latency_ns(&self) -> u64
Get the average latency
Sourcefn clone_box(&self) -> Box<dyn LatencyModel>
fn clone_box(&self) -> Box<dyn LatencyModel>
Clone the latency model