[][src]Trait metrics_core::AsNanoseconds

pub trait AsNanoseconds {
    fn as_nanos(&self) -> u64;
}

Used to do a nanosecond conversion.

This trait allows us to interchangably accept raw integer time values, ones already in nanoseconds, as well as the more conventional Duration which is a result of getting the difference between two Instants.

Required methods

fn as_nanos(&self) -> u64

Performs the conversion.

Loading content...

Implementations on Foreign Types

impl AsNanoseconds for u64[src]

impl AsNanoseconds for Duration[src]

Loading content...

Implementors

Loading content...