Struct crs_bind::rtos::Instant [−][src]
Represents a time on a monotonically increasing clock (i.e., time since program start).
This type has a precision of 1 millisecond.
Implementations
impl Instant[src]
pub fn from_millis(millis: u32) -> Self[src]
Creates a new Instant from the specified number of whole milliseconds
since program start.
pub fn from_secs(secs: u32) -> Self[src]
Creates a new Instant from the specified number of whole seconds since
program start.
pub fn as_millis(&self) -> u32[src]
Returns the number of whole seconds since program start contained by
this Instant.
The returned value does not include the fractional (milliseconds) part of the time value.
pub fn as_secs(&self) -> u32[src]
Returns the number of whole milliseconds since program start contained
by this Instant.
pub fn subsec_millis(&self) -> u32[src]
Returns the fractional part of this Instant, in whole milliseconds.
This method does not return the time value in milliseconds. The returned number always represents a fractional portion of a second (i.e., it is less than one thousand).
pub fn checked_add(self, rhs: Duration) -> Option<Self>[src]
Checked addition of a Duration to an Instant. Computes self + rhs, returning None if overflow occurred.
pub fn checked_sub(self, rhs: Duration) -> Option<Instant>[src]
Checked subtraction of a Duration from an Instant. Computes
self - rhs, returning None if the result would be negative or
overflow occurred.
pub fn checked_sub_instant(self, rhs: Self) -> Option<Duration>[src]
Checked subtraction of two Instants. Computes self - rhs, returning
None if the result would be negative or overflow occurred.
pub fn checked_mul(self, rhs: u32) -> Option<Instant>[src]
Checked multiplication of an Instant by a scalar. Computes self * rhs, returning None if an overflow occurred.
Trait Implementations
impl Add<Duration> for Instant[src]
type Output = Instant
The resulting type after applying the + operator.
fn add(self, rhs: Duration) -> Self::Output[src]
impl Clone for Instant[src]
fn clone(&self) -> Instant[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for Instant[src]
impl Debug for Instant[src]
impl Display for Instant[src]
impl Div<u32> for Instant[src]
type Output = Instant
The resulting type after applying the / operator.
fn div(self, rhs: u32) -> Self::Output[src]
impl Eq for Instant[src]
impl Mul<u32> for Instant[src]
type Output = Instant
The resulting type after applying the * operator.
fn mul(self, rhs: u32) -> Self::Output[src]
impl Ord for Instant[src]
fn cmp(&self, other: &Instant) -> Ordering[src]
#[must_use]pub fn max(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn min(self, other: Self) -> Self1.21.0[src]
#[must_use]pub fn clamp(self, min: Self, max: Self) -> Self1.50.0[src]
impl PartialEq<Instant> for Instant[src]
impl PartialOrd<Instant> for Instant[src]
fn partial_cmp(&self, other: &Instant) -> Option<Ordering>[src]
#[must_use]pub fn lt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn le(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn gt(&self, other: &Rhs) -> bool1.0.0[src]
#[must_use]pub fn ge(&self, other: &Rhs) -> bool1.0.0[src]
impl StructuralEq for Instant[src]
impl StructuralPartialEq for Instant[src]
impl Sub<Duration> for Instant[src]
type Output = Instant
The resulting type after applying the - operator.
fn sub(self, rhs: Duration) -> Self::Output[src]
impl Sub<Instant> for Instant[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T> ToString for T where
T: Display + ?Sized, [src]
T: Display + ?Sized,
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.
pub 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>,