Trait LatencyModel

Source
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§

Source

fn get_latency_ns(&self) -> u64

Get the next latency value in nanoseconds

Source

fn avg_latency_ns(&self) -> u64

Get the average latency

Source

fn clone_box(&self) -> Box<dyn LatencyModel>

Clone the latency model

Implementors§