[][src]Trait metrics_runtime::Delta

pub trait Delta {
    fn delta(&self, other: Self) -> u64;
}

Trait for types that represent time and can be subtracted from each other to generate a delta.

Required methods

fn delta(&self, other: Self) -> u64

Get the delta between this value and another value.

For Instant, we explicitly return the nanosecond difference. For u64, we return the integer difference, but the timescale itself can be whatever the user desires.

Loading content...

Implementations on Foreign Types

impl Delta for u64[src]

impl Delta for Instant[src]

Loading content...

Implementors

Loading content...