Struct std::time::Duration [] [src]

pub struct Duration {
    pub secs: i64,
    pub nanos: i32,
}

Fields

secs
nanos

Methods

impl Duration

fn new(secs: i64, nanos: i32) -> Self

Create a new duration

fn monotonic() -> Self

Get the monotonic time

fn realtime() -> Self

Get the realtime

Trait Implementations

impl Add for Duration

type Output = Duration

fn add(self, other: Self) -> Self

impl Sub for Duration

type Output = Duration

fn sub(self, other: Self) -> Self

impl PartialEq for Duration

fn eq(&self, other: &Self) -> bool

fn ne(&self, other: &Rhs) -> bool

impl PartialOrd for Duration

fn partial_cmp(&self, other: &Self) -> Option<Ordering>

fn lt(&self, other: &Rhs) -> bool

fn le(&self, other: &Rhs) -> bool

fn gt(&self, other: &Rhs) -> bool

fn ge(&self, other: &Rhs) -> bool

Derived Implementations

impl Clone for Duration

fn clone(&self) -> Duration

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

impl Copy for Duration