pub struct Instant(/* private fields */);Expand description
See std::time::Instant.
Implementations§
Source§impl Instant
impl Instant
Sourcepub fn now() -> Self
Available on target_family=wasm and target_os=unknown only.
pub fn now() -> Self
target_family=wasm and target_os=unknown only.See std::time::Instant::now().
§Panics
This call will panic if the Performance object was not found, e.g.
calling from a worklet.
Sourcepub fn duration_since(&self, earlier: Self) -> Duration
Available on target_family=wasm and target_os=unknown only.
pub fn duration_since(&self, earlier: Self) -> Duration
target_family=wasm and target_os=unknown only.Sourcepub fn checked_duration_since(&self, earlier: Self) -> Option<Duration>
Available on target_family=wasm and target_os=unknown only.
pub fn checked_duration_since(&self, earlier: Self) -> Option<Duration>
target_family=wasm and target_os=unknown only.Sourcepub fn saturating_duration_since(&self, earlier: Self) -> Duration
Available on target_family=wasm and target_os=unknown only.
pub fn saturating_duration_since(&self, earlier: Self) -> Duration
target_family=wasm and target_os=unknown only.Sourcepub fn checked_add(&self, duration: Duration) -> Option<Self>
Available on target_family=wasm and target_os=unknown only.
pub fn checked_add(&self, duration: Duration) -> Option<Self>
target_family=wasm and target_os=unknown only.Sourcepub fn checked_sub(&self, duration: Duration) -> Option<Self>
Available on target_family=wasm and target_os=unknown only.
pub fn checked_sub(&self, duration: Duration) -> Option<Self>
target_family=wasm and target_os=unknown only.Trait Implementations§
Source§impl AddAssign<Duration> for Instant
Available on target_family=wasm and target_os=unknown only.
impl AddAssign<Duration> for Instant
Available on
target_family=wasm and target_os=unknown only.Source§fn add_assign(&mut self, other: Duration)
fn add_assign(&mut self, other: Duration)
Performs the
+= operation. Read moreSource§impl Ord for Instant
Available on target_family=wasm and target_os=unknown only.
impl Ord for Instant
Available on
target_family=wasm and target_os=unknown only.Source§impl PartialOrd for Instant
Available on target_family=wasm and target_os=unknown only.
impl PartialOrd for Instant
Available on
target_family=wasm and target_os=unknown only.Source§impl SubAssign<Duration> for Instant
Available on target_family=wasm and target_os=unknown only.
impl SubAssign<Duration> for Instant
Available on
target_family=wasm and target_os=unknown only.Source§fn sub_assign(&mut self, other: Duration)
fn sub_assign(&mut self, other: Duration)
Performs the
-= operation. Read moreimpl Copy for Instant
Available on
target_family=wasm and target_os=unknown only.impl Eq for Instant
Available on
target_family=wasm and target_os=unknown only.impl StructuralPartialEq for Instant
Available on
target_family=wasm and target_os=unknown only.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