[][src]Struct smoltcp::time::Duration

pub struct Duration {
    pub millis: u64,
}

A relative amount of time.

Fields

millis: u64

Implementations

impl Duration[src]

pub const fn from_millis(millis: u64) -> Duration[src]

Create a new Duration from a number of milliseconds.

pub const fn from_secs(secs: u64) -> Duration[src]

Create a new Instant from a number of seconds.

pub const fn millis(&self) -> u64[src]

The fractional number of milliseconds in this Duration.

pub const fn secs(&self) -> u64[src]

The number of whole seconds in this Duration.

pub const fn total_millis(&self) -> u64[src]

The total number of milliseconds in this Duration.

Trait Implementations

impl Add<Duration> for Instant[src]

type Output = Instant

The resulting type after applying the + operator.

impl Add<Duration> for Duration[src]

type Output = Duration

The resulting type after applying the + operator.

impl AddAssign<Duration> for Instant[src]

impl AddAssign<Duration> for Duration[src]

impl Clone for Duration[src]

impl Copy for Duration[src]

impl Debug for Duration[src]

impl Default for Duration[src]

impl Display for Duration[src]

impl Div<u32> for Duration[src]

type Output = Duration

The resulting type after applying the / operator.

impl DivAssign<u32> for Duration[src]

impl Eq for Duration[src]

impl From<Duration> for Duration[src]

impl Into<Duration> for Duration[src]

impl Mul<u32> for Duration[src]

type Output = Duration

The resulting type after applying the * operator.

impl MulAssign<u32> for Duration[src]

impl Ord for Duration[src]

impl PartialEq<Duration> for Duration[src]

impl PartialOrd<Duration> for Duration[src]

impl StructuralEq for Duration[src]

impl StructuralPartialEq for Duration[src]

impl Sub<Duration> for Instant[src]

type Output = Instant

The resulting type after applying the - operator.

impl Sub<Duration> for Duration[src]

type Output = Duration

The resulting type after applying the - operator.

impl SubAssign<Duration> for Instant[src]

impl SubAssign<Duration> for Duration[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.