[][src]Struct alacritty::meter::Meter

pub struct Meter {
    times: [f64; 10],
    avg: f64,
    index: usize,
}

The meter.

Fields

times: [f64; 10]

Track last 60 timestamps.

avg: f64

Average sample time in microseconds.

index: usize

Index of next time to update..

Implementations

impl Meter[src]

pub fn new() -> Meter[src]

Create a meter.

pub fn sampler(&mut self) -> Sampler<'_>[src]

Get a sampler.

pub fn average(&self) -> f64[src]

Get the current average sample duration in microseconds.

fn add_sample(&mut self, sample: Duration)[src]

Add a sample.

Used by Sampler::drop.

Trait Implementations

impl Default for Meter[src]

Auto Trait Implementations

impl RefUnwindSafe for Meter

impl Send for Meter

impl Sync for Meter

impl Unpin for Meter

impl UnwindSafe for Meter

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.