Struct network_time::MillisecondDuration[][src]

pub struct MillisecondDuration(_);

Represents a duration in milliseconds.

Methods

impl MillisecondDuration
[src]

Zero: Self = <Self>::from_milliseconds(0)

Zero.

OneSecond: Self = <Self>::from_seconds(1)

One second.

ThreeSeconds: Self = <Self>::from_seconds(3)

3 seconds.

FiveSeconds: Self = <Self>::from_seconds(5)

5 seconds.

TenSeconds: Self = <Self>::from_seconds(10)

Ten seconds.

FifteenSeconds: Self = <Self>::from_seconds(15)

Fifteen seconds.

ThirtySeconds: Self = <Self>::from_seconds(30)

Thirty seconds.

OneMinute: Self = <Self>::from_minutes(1)

One minute.

TwoMinutes: Self = <Self>::from_minutes(2)

Two minutes.

FourMinutes: Self = <Self>::from_minutes(4)

Four minutes.

FiveMinutes: Self = <Self>::from_minutes(5)

Five minutes.

TwoHours: Self = <Self>::from_seconds(1)

Two hours

From tick duration.

From milliseconds.

From seconds.

From minutes.

From hours.

Is zero.

Is not zero.

As seconds, rounded down.

Absolute difference, |self - right|.

Trait Implementations

impl Debug for MillisecondDuration
[src]

Formats the value using the given formatter. Read more

impl Copy for MillisecondDuration
[src]

impl Clone for MillisecondDuration
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Ord for MillisecondDuration
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl PartialOrd for MillisecondDuration
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Eq for MillisecondDuration
[src]

impl PartialEq for MillisecondDuration
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Hash for MillisecondDuration
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Display for MillisecondDuration
[src]

Formats the value using the given formatter. Read more

impl From<u8> for MillisecondDuration
[src]

Performs the conversion.

impl From<u16> for MillisecondDuration
[src]

Performs the conversion.

impl From<u32> for MillisecondDuration
[src]

Performs the conversion.

impl From<u64> for MillisecondDuration
[src]

Performs the conversion.

impl Into<u64> for MillisecondDuration
[src]

Performs the conversion.

impl Into<TickDuration> for MillisecondDuration
[src]

Performs the conversion.

impl Add for MillisecondDuration
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl Sub for MillisecondDuration
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl Mul<u64> for MillisecondDuration
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl Div for MillisecondDuration
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Div<u64> for MillisecondDuration
[src]

The resulting type after applying the / operator.

Performs the / operation.

impl Shl<u64> for MillisecondDuration
[src]

The resulting type after applying the << operator.

Performs the << operation.

impl Default for MillisecondDuration
[src]

Returns the "default value" for a type. Read more

impl Add<MillisecondDuration> for MonotonicMillisecondTimestamp
[src]

The resulting type after applying the + operator.

Performs the + operation.

Auto Trait Implementations