Struct gilrs::ff::Ticks[][src]

pub struct Ticks(_);

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);

Methods

impl Ticks
[src]

Trait Implementations

impl Copy for Ticks
[src]

impl Clone for Ticks
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Ticks
[src]

Formats the value using the given formatter. Read more

impl PartialEq for Ticks
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Ticks
[src]

impl PartialOrd for Ticks
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for Ticks
[src]

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

impl Default for Ticks
[src]

Returns the "default value" for a type. Read more

impl From<Duration> for Ticks
[src]

Performs the conversion.

impl Add for Ticks
[src]

The resulting type after applying the + operator.

Performs the + operation.

impl AddAssign for Ticks
[src]

Performs the += operation.

impl Sub for Ticks
[src]

The resulting type after applying the - operator.

Performs the - operation.

impl SubAssign for Ticks
[src]

Performs the -= operation.

impl Mul<u32> for Ticks
[src]

The resulting type after applying the * operator.

Performs the * operation.

impl MulAssign<u32> for Ticks
[src]

Performs the *= operation.

impl Rem for Ticks
[src]

The resulting type after applying the % operator.

Performs the % operation.

Auto Trait Implementations

impl Send for Ticks

impl Sync for Ticks