pub struct Millis(pub u64);Expand description
A moment on the backend’s clock, in whole milliseconds. Where the clock
counts from (the program’s start, the device’s, 1970) doesn’t matter:
App only takes differences. A clock that goes backwards
counts as no time passing.
Tuple Fields§
§0: u64Implementations§
Source§impl Millis
impl Millis
Sourcepub fn from_secs_f64(secs: f64) -> Self
pub fn from_secs_f64(secs: f64) -> Self
The time secs seconds into the clock: a backend whose clock gives
seconds as an f64, from a clock that should never go back. A
negative, NaN or endless time is 0.
Sourcepub fn since(self, earlier: Millis) -> Duration
pub fn since(self, earlier: Millis) -> Duration
The time since earlier, or none if earlier is later.
Sourcepub fn as_secs_f64(self) -> f64
pub fn as_secs_f64(self) -> f64
The time in seconds, for a sound player that keeps time in them.
Trait Implementations§
impl Copy for Millis
impl Eq for Millis
Source§impl Ord for Millis
impl Ord for Millis
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Millis
impl PartialOrd for Millis
impl StructuralPartialEq for Millis
Auto Trait Implementations§
impl Freeze for Millis
impl RefUnwindSafe for Millis
impl Send for Millis
impl Sync for Millis
impl Unpin for Millis
impl UnsafeUnpin for Millis
impl UnwindSafe for Millis
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more