Struct image::Delay [−][src]
pub struct Delay { /* fields omitted */ }
Expand description
The delay of a frame relative to the previous one.
Implementations
Create a delay from a ratio of milliseconds.
Examples
use image::Delay; let delay_10ms = Delay::from_numer_denom_ms(10, 1);
Convert from a duration, clamped between 0 and an implemented defined maximum.
The maximum is at least i32::MAX
milliseconds. It should be noted that the accuracy of
the result may be relative and very large delays have a coarse resolution.
Examples
use std::time::Duration; use image::Delay; let duration = Duration::from_millis(20); let delay = Delay::from_saturating_duration(duration);
Trait Implementations
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
Auto Trait Implementations
impl RefUnwindSafe for Delay
impl UnwindSafe for Delay
Blanket Implementations
Mutably borrows from an owned value. Read more