pub struct Ticks(pub(super) u32);
Expand description
Represents duration.
This type is only useful as input parameter for other functions in force feedback module. To
create it, use from_ms()
method. Keep in mind that Ticks
is not precise representation
of time.
§Example
use gilrs::ff::Ticks;
use std::time::Duration;
let t1 = Ticks::from_ms(110);
let t2 = Ticks::from(Duration::from_millis(130));
/// `Ticks` is not precise.
assert_eq!(t1, t2);
Tuple Fields§
§0: u32
Implementations§
Trait Implementations§
source§impl AddAssign for Ticks
impl AddAssign for Ticks
source§fn add_assign(&mut self, rhs: Ticks)
fn add_assign(&mut self, rhs: Ticks)
Performs the
+=
operation. Read moresource§impl MulAssign<u32> for Ticks
impl MulAssign<u32> for Ticks
source§fn mul_assign(&mut self, rhs: u32)
fn mul_assign(&mut self, rhs: u32)
Performs the
*=
operation. Read moresource§impl Ord for Ticks
impl Ord for Ticks
source§impl PartialEq for Ticks
impl PartialEq for Ticks
source§impl PartialOrd for Ticks
impl PartialOrd for Ticks
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 for Ticks
impl SubAssign for Ticks
source§fn sub_assign(&mut self, rhs: Ticks)
fn sub_assign(&mut self, rhs: Ticks)
Performs the
-=
operation. Read moreimpl Copy for Ticks
impl Eq for Ticks
impl StructuralPartialEq for Ticks
Auto Trait Implementations§
impl Freeze for Ticks
impl RefUnwindSafe for Ticks
impl Send for Ticks
impl Sync for Ticks
impl Unpin for Ticks
impl UnwindSafe for Ticks
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