pub struct Instant { /* private fields */ }
Expand description
A time instant, from the start of a timer, with nanosecond precision. Has methods similar
to that found in core::Duration
.
Implementations§
Source§impl Instant
An instant. Designed to be, in its most basic sense, similar to std::time::Instant
. Created
from the now()
method on a Timer
. Can be compared to create a core::Duration
. Standalone
methods on this struct are similar to those on Duration
, but return timestamps since the timer start.
impl Instant
An instant. Designed to be, in its most basic sense, similar to std::time::Instant
. Created
from the now()
method on a Timer
. Can be compared to create a core::Duration
. Standalone
methods on this struct are similar to those on Duration
, but return timestamps since the timer start.
Sourcepub fn as_millis_f32(&self) -> f32
pub fn as_millis_f32(&self) -> f32
The time, in milliseconds as an f32.
Trait Implementations§
Source§impl Ord for Instant
impl Ord for Instant
Source§impl PartialOrd for Instant
impl PartialOrd for Instant
impl Copy for Instant
impl Eq for Instant
impl StructuralPartialEq for Instant
Auto Trait Implementations§
impl Freeze for Instant
impl RefUnwindSafe for Instant
impl Send for Instant
impl Sync for Instant
impl Unpin for Instant
impl UnwindSafe for Instant
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