Struct network_time::Tick [−][src]
pub struct Tick(_);
Represents a 'tick', currently 128 milliseconds of time.
Methods
impl Tick
[src]
impl Tick
pub const Zero: Self
Zero: Self = Tick(0)
Zero.
pub fn now() -> Self
[src]
pub fn now() -> Self
Now.
pub fn milliseconds_to_ticks_rounded_down(
milliseconds: MonotonicMillisecondTimestamp
) -> Tick
[src]
pub fn milliseconds_to_ticks_rounded_down(
milliseconds: MonotonicMillisecondTimestamp
) -> Tick
Milliseconds to ticks rounded down.
pub fn milliseconds_to_ticks_rounded_up(
milliseconds: MonotonicMillisecondTimestamp
) -> Tick
[src]
pub fn milliseconds_to_ticks_rounded_up(
milliseconds: MonotonicMillisecondTimestamp
) -> Tick
Milliseconds to ticks rounded up.
pub fn to_milliseconds(self) -> MonotonicMillisecondTimestamp
[src]
pub fn to_milliseconds(self) -> MonotonicMillisecondTimestamp
Ticks to milliseconds.
pub fn is_zero(self) -> bool
[src]
pub fn is_zero(self) -> bool
Is zero?
Trait Implementations
impl Default for Tick
[src]
impl Default for Tick
impl Debug for Tick
[src]
impl Debug for Tick
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for Tick
[src]
impl Copy for Tick
impl Clone for Tick
[src]
impl Clone for Tick
fn clone(&self) -> Tick
[src]
fn clone(&self) -> Tick
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Ord for Tick
[src]
impl Ord for Tick
fn cmp(&self, other: &Tick) -> Ordering
[src]
fn cmp(&self, other: &Tick) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl PartialOrd for Tick
[src]
impl PartialOrd for Tick
fn partial_cmp(&self, other: &Tick) -> Option<Ordering>
[src]
fn partial_cmp(&self, other: &Tick) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &Tick) -> bool
[src]
fn lt(&self, other: &Tick) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &Tick) -> bool
[src]
fn le(&self, other: &Tick) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &Tick) -> bool
[src]
fn gt(&self, other: &Tick) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &Tick) -> bool
[src]
fn ge(&self, other: &Tick) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Eq for Tick
[src]
impl Eq for Tick
impl PartialEq for Tick
[src]
impl PartialEq for Tick
fn eq(&self, other: &Tick) -> bool
[src]
fn eq(&self, other: &Tick) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Tick) -> bool
[src]
fn ne(&self, other: &Tick) -> bool
This method tests for !=
.
impl Hash for Tick
[src]
impl Hash for Tick
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
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]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Display for Tick
[src]
impl Display for Tick
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Add<u64> for Tick
[src]
impl Add<u64> for Tick
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: u64) -> Self::Output
[src]
fn add(self, rhs: u64) -> Self::Output
Performs the +
operation.
impl AddAssign<u64> for Tick
[src]
impl AddAssign<u64> for Tick
fn add_assign(&mut self, other: u64)
[src]
fn add_assign(&mut self, other: u64)
Performs the +=
operation.
impl Add<TickDuration> for Tick
[src]
impl Add<TickDuration> for Tick
type Output = Self
The resulting type after applying the +
operator.
fn add(self, rhs: TickDuration) -> Self::Output
[src]
fn add(self, rhs: TickDuration) -> Self::Output
Performs the +
operation.
impl Sub<u64> for Tick
[src]
impl Sub<u64> for Tick
type Output = Self
The resulting type after applying the -
operator.
fn sub(self, rhs: u64) -> Self::Output
[src]
fn sub(self, rhs: u64) -> Self::Output
Performs the -
operation.
impl Sub<Tick> for Tick
[src]
impl Sub<Tick> for Tick
type Output = TickDuration
The resulting type after applying the -
operator.
fn sub(self, rhs: Self) -> Self::Output
[src]
fn sub(self, rhs: Self) -> Self::Output
Performs the -
operation.
impl Div for Tick
[src]
impl Div for Tick