#[repr(C)]pub struct TimeSpec(_);
Implementations§
source§impl TimeSpec
impl TimeSpec
sourcepub const fn new(seconds: time_t, nanoseconds: c_long) -> Self
pub const fn new(seconds: time_t, nanoseconds: c_long) -> Self
Construct a new TimeSpec
from its components
pub const fn tv_sec(&self) -> time_t
pub const fn tv_nsec(&self) -> c_long
pub const fn from_duration(duration: Duration) -> Self
pub const fn from_timespec(timespec: timespec) -> Self
Trait Implementations§
source§impl Ord for TimeSpec
impl Ord for TimeSpec
source§impl PartialEq<TimeSpec> for TimeSpec
impl PartialEq<TimeSpec> for TimeSpec
source§impl PartialOrd<TimeSpec> for TimeSpec
impl PartialOrd<TimeSpec> for TimeSpec
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TimeValLike for TimeSpec
impl TimeValLike for TimeSpec
source§fn microseconds(microseconds: i64) -> TimeSpec
fn microseconds(microseconds: i64) -> TimeSpec
Makes a new TimeSpec
with given number of microseconds.
source§fn nanoseconds(nanoseconds: i64) -> TimeSpec
fn nanoseconds(nanoseconds: i64) -> TimeSpec
Makes a new TimeSpec
with given number of nanoseconds.