Struct i_slint_core::animations::Instant
source · #[repr(transparent)]pub struct Instant(pub u64);Expand description
Represent an instant, in milliseconds since the AnimationDriver’s initial_instant
Tuple Fields§
§0: u64Implementations§
source§impl Instant
impl Instant
sourcepub fn duration_since(self, earlier: Instant) -> Duration
pub fn duration_since(self, earlier: Instant) -> Duration
Returns the amount of time elapsed since an other instant.
Equivalent to self - earlier
sourcepub fn now() -> Self
pub fn now() -> Self
Wrapper around std::time::Instant::now() that delegates to the backend
and allows working in no_std environments.
Trait Implementations§
source§impl AddAssign<Duration> for Instant
impl AddAssign<Duration> for Instant
source§fn add_assign(&mut self, other: Duration)
fn add_assign(&mut self, other: Duration)
Performs the
+= operation. Read moresource§impl Ord for Instant
impl Ord for Instant
source§impl PartialEq<Instant> for Instant
impl PartialEq<Instant> for Instant
source§impl PartialOrd<Instant> for Instant
impl PartialOrd<Instant> for Instant
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl SubAssign<Duration> for Instant
impl SubAssign<Duration> for Instant
source§fn sub_assign(&mut self, other: Duration)
fn sub_assign(&mut self, other: Duration)
Performs the
-= operation. Read more