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]

[src]

Trait Implementations

impl Copy for Ticks
[src]

impl Clone for Ticks
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Ticks
[src]

[src]

Formats the value using the given formatter.

impl PartialEq for Ticks
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for Ticks
[src]

impl PartialOrd for Ticks
[src]

[src]

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

[src]

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

[src]

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

[src]

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

[src]

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]

[src]

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

1.22.0
[src]

Compares and returns the maximum of two values. Read more

1.22.0
[src]

Compares and returns the minimum of two values. Read more

impl Default for Ticks
[src]

[src]

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

impl From<Duration> for Ticks
[src]

[src]

Performs the conversion.

impl Add for Ticks
[src]

The resulting type after applying the + operator.

[src]

Performs the + operation.

impl AddAssign for Ticks
[src]

[src]

Performs the += operation.

impl Sub for Ticks
[src]

The resulting type after applying the - operator.

[src]

Performs the - operation.

impl SubAssign for Ticks
[src]

[src]

Performs the -= operation.

impl Mul<u32> for Ticks
[src]

The resulting type after applying the * operator.

[src]

Performs the * operation.

impl MulAssign<u32> for Ticks
[src]

[src]

Performs the *= operation.

impl Rem for Ticks
[src]

The resulting type after applying the % operator.

[src]

Performs the % operation.