Struct fuchsia_zircon::Duration
[−]
[src]
pub struct Duration(_);
Methods
impl Duration
[src]
fn sleep(self)
[src]
Sleep for the given amount of time.
fn nanos(self) -> u64
[src]
fn millis(self) -> u64
[src]
fn seconds(self) -> u64
[src]
fn minutes(self) -> u64
[src]
fn hours(self) -> u64
[src]
fn from_nanos(nanos: u64) -> Self
[src]
fn from_millis(millis: u64) -> Self
[src]
fn from_seconds(secs: u64) -> Self
[src]
fn from_minutes(min: u64) -> Self
[src]
fn from_hours(hours: u64) -> Self
[src]
fn after_now(self) -> Time
[src]
Returns a Time
which is a Duration
after the current time.
duration.after_now()
is equivalent to Time::after(duration)
.
Trait Implementations
impl Debug for Duration
[src]
impl Copy for Duration
[src]
impl Clone for Duration
[src]
fn clone(&self) -> Duration
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Duration
[src]
impl PartialEq for Duration
[src]
fn eq(&self, __arg_0: &Duration) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Duration) -> bool
[src]
This method tests for !=
.
impl Ord for Duration
[src]
fn cmp(&self, __arg_0: &Duration) -> Ordering
[src]
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.22.0[src]
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.22.0[src]
Compares and returns the minimum of two values. Read more
impl PartialOrd for Duration
[src]
fn partial_cmp(&self, __arg_0: &Duration) -> Option<Ordering>
[src]
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, __arg_0: &Duration) -> bool
[src]
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, __arg_0: &Duration) -> bool
[src]
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, __arg_0: &Duration) -> bool
[src]
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, __arg_0: &Duration) -> bool
[src]
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Hash for Duration
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
[src]
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl From<Duration> for Duration
[src]
impl Add<Time> for Duration
[src]
type Output = Time
The resulting type after applying the +
operator.
fn add(self, time: Time) -> Time
[src]
Performs the +
operation.
impl Add for Duration
[src]
type Output = Duration
The resulting type after applying the +
operator.
fn add(self, dur: Duration) -> Duration
[src]
Performs the +
operation.
impl Sub for Duration
[src]
type Output = Duration
The resulting type after applying the -
operator.
fn sub(self, dur: Duration) -> Duration
[src]
Performs the -
operation.
impl AddAssign for Duration
[src]
fn add_assign(&mut self, dur: Duration)
[src]
Performs the +=
operation.
impl SubAssign for Duration
[src]
fn sub_assign(&mut self, dur: Duration)
[src]
Performs the -=
operation.
impl<T> Mul<T> for Duration where
T: Into<u64>,
[src]
T: Into<u64>,
type Output = Self
The resulting type after applying the *
operator.
fn mul(self, mul: T) -> Self
[src]
Performs the *
operation.
impl<T> Div<T> for Duration where
T: Into<u64>,
[src]
T: Into<u64>,