[−][src]Struct linux::time::Time
A time offset.
= Remarks
This can have various meanings such as the duration of a timeout parameter or the offset from the epoch when a file was created.
Fields
seconds: i64
The seconds part of the offset.
nanoseconds: i64
The nanoseconds part of the offset.
Methods
impl Time
[src]
pub fn normalize(self) -> Time
[src]
Normalizes the time.
= Remarks
That is, transforms self
into an equivalent representation where nanoseconds
is in [0, 1_000_000_000).
pub fn nanoseconds(n: i64) -> Time
[src]
Creates a Time
that represents a number of nanoseconds.
[argument, n] The number of nanoseconds.
pub fn microseconds(m: i64) -> Time
[src]
Creates a Time
that represents a number of microseconds.
[argument, m] The number of microseconds.
pub fn milliseconds(m: i64) -> Time
[src]
Creates a Time
that represents a number of milliseconds.
[argument, m] The number of milliseconds.
pub fn seconds(s: i64) -> Time
[src]
Creates a Time
that represents a number of seconds.
[argument, s] The number of seconds.
pub fn minutes(m: i64) -> Time
[src]
Creates a Time
that represents a number of minutes.
[argument, m] The number of minutes.
pub fn hours(h: i64) -> Time
[src]
Creates a Time
that represents a number of hours.
[argument, h] The number of hours.
pub fn days(d: i64) -> Time
[src]
Creates a Time
that represents a number of days.
[argument, d] The number of days.
Trait Implementations
impl Pod for Time
[src]
fn _assert_pod()
[src]
impl Eq for Time
[src]
impl Ord for Time
[src]
fn cmp(&self, other: &Time) -> Ordering
[src]
fn max(self, other: Self) -> Self
1.21.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
Compares and returns the minimum of two values. Read more
fn clamp(self, min: Self, max: Self) -> Self
[src]
clamp
)Restrict a value to a certain interval. Read more
impl PartialEq<Time> for Time
[src]
impl Copy for Time
[src]
impl Clone for Time
[src]
fn clone(&self) -> Time
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl PartialOrd<Time> for Time
[src]
fn partial_cmp(&self, other: &Time) -> Option<Ordering>
[src]
#[must_use]
fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
#[must_use]
fn le(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
#[must_use]
fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
#[must_use]
fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Debug for Time
[src]
impl Sub<Time> for Time
[src]
type Output = Time
The resulting type after applying the -
operator.
fn sub(self, other: Time) -> Time
[src]
impl Add<Time> for Time
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,