Struct tic::Sample [] [src]

pub struct Sample<T> {
    // some fields omitted
}

a start and stop time for a metric

Methods

impl<T: Hash + Eq + Send + Display + Clone> Sample<T>
[src]

fn new(start: Instant, stop: Instant, metric: T) -> Sample<T>

create a new Sample from given start, stop, and metric

fn metric(&self) -> T

return the metric

fn duration(&self) -> u64

return the duration

fn start(&self) -> Instant

return the start time

Trait Implementations

impl<T: Clone> Clone for Sample<T>
[src]

fn clone(&self) -> Sample<T>

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more