#[repr(C)]pub struct TimeSpec(_);
Implementations
sourceimpl 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
sourceimpl Ord for TimeSpec
impl Ord for TimeSpec
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialOrd<TimeSpec> for TimeSpec
impl PartialOrd<TimeSpec> for TimeSpec
sourcefn partial_cmp(&self, other: &TimeSpec) -> Option<Ordering>
fn partial_cmp(&self, other: &TimeSpec) -> Option<Ordering>
1.0.0 · sourcefn 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 moresourceimpl TimeValLike for TimeSpec
impl TimeValLike for TimeSpec
sourcefn microseconds(microseconds: i64) -> TimeSpec
fn microseconds(microseconds: i64) -> TimeSpec
Makes a new TimeSpec
with given number of microseconds.
sourcefn nanoseconds(nanoseconds: i64) -> TimeSpec
fn nanoseconds(nanoseconds: i64) -> TimeSpec
Makes a new TimeSpec
with given number of nanoseconds.
fn seconds(seconds: i64) -> TimeSpec
fn milliseconds(milliseconds: i64) -> TimeSpec
fn num_seconds(&self) -> i64
fn num_milliseconds(&self) -> i64
fn num_microseconds(&self) -> i64
fn num_nanoseconds(&self) -> i64
fn zero() -> Self
fn hours(hours: i64) -> Self
fn minutes(minutes: i64) -> Self
fn num_hours(&self) -> i64
fn num_minutes(&self) -> i64
impl Copy for TimeSpec
impl Eq for TimeSpec
impl StructuralEq for TimeSpec
impl StructuralPartialEq for TimeSpec
Auto Trait Implementations
impl RefUnwindSafe for TimeSpec
impl Send for TimeSpec
impl Sync for TimeSpec
impl Unpin for TimeSpec
impl UnwindSafe for TimeSpec
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more