Struct time::Timespec [] [src]

pub struct Timespec {
    pub sec: i64,
    pub nsec: i32,
}

A record specifying a time value in seconds and nanoseconds, where nanoseconds represent the offset from the given second.

For example a timespec of 1.2 seconds after the beginning of the epoch would be represented as {sec: 1, nsec: 200000000}.

Fields

sec
nsec

Methods

impl Timespec

fn new(sec: i64, nsec: i32) -> Timespec

Trait Implementations

impl Add<Duration> for Timespec

type Output = Timespec

fn add(self, other: Duration) -> Timespec

impl Sub<Duration> for Timespec

type Output = Timespec

fn sub(self, other: Duration) -> Timespec

impl Sub<Timespec> for Timespec

type Output = Duration

fn sub(self, other: Timespec) -> Duration

Derived Implementations

impl Hash for Timespec

fn hash<__H: Hasher>(&self, arg_0: &mut __H)

1.3.0fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl Debug for Timespec

fn fmt(&self, arg_0: &mut Formatter) -> Result

impl Ord for Timespec

fn cmp(&self, arg_0: &Timespec) -> Ordering

impl PartialOrd for Timespec

fn partial_cmp(&self, arg_0: &Timespec) -> Option<Ordering>

fn lt(&self, arg_0: &Timespec) -> bool

fn le(&self, arg_0: &Timespec) -> bool

fn gt(&self, arg_0: &Timespec) -> bool

fn ge(&self, arg_0: &Timespec) -> bool

impl Eq for Timespec

impl PartialEq for Timespec

fn eq(&self, arg_0: &Timespec) -> bool

fn ne(&self, arg_0: &Timespec) -> bool

impl Clone for Timespec

fn clone(&self) -> Timespec

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

impl Copy for Timespec