[][src]Struct qt_core::TimerType

#[repr(transparent)]
pub struct TimerType(_);

The timer type indicates how accurate a timer can be.

C++ enum: Qt::TimerType.

C++ documentation:

The timer type indicates how accurate a timer can be.

On UNIX (including Linux, macOS, and iOS), Qt will keep millisecond accuracy for Qt::PreciseTimer. For Qt::CoarseTimer, the interval will be adjusted up to 5% to align the timer with other timers that are expected to fire at or around the same time. The objective is to make most timers wake up at the same time, thereby reducing CPU wakeups and power consumption.

On Windows, Qt will use Windows's Multimedia timer facility (if available) for Qt::PreciseTimer and normal Windows timers for Qt::CoarseTimer and Qt::VeryCoarseTimer.

On all platforms, the interval for Qt::VeryCoarseTimer is rounded to the nearest full second (e.g. an interval of 23500ms will be rounded to 24000ms, and 20300ms to 20000ms).

Methods

impl TimerType[src]

pub fn to_int(&self) -> c_int[src]

impl TimerType[src]

pub const PreciseTimer: TimerType[src]

Precise timers try to keep millisecond accuracy (C++ enum variant: PreciseTimer = 0)

pub const CoarseTimer: TimerType[src]

Coarse timers try to keep accuracy within 5% of the desired interval (C++ enum variant: CoarseTimer = 1)

pub const VeryCoarseTimer: TimerType[src]

Very coarse timers only keep full second accuracy (C++ enum variant: VeryCoarseTimer = 2)

Trait Implementations

impl From<i32> for TimerType[src]

impl From<TimerType> for c_int[src]

impl Clone for TimerType[src]

impl Copy for TimerType[src]

impl Eq for TimerType[src]

impl PartialEq<TimerType> for TimerType[src]

impl Debug for TimerType[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]