[−][src]Struct qt_core::TimerType
The timer type indicates how accurate a timer can be.
C++ enum: Qt::TimerType
.
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]
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
impl Send for TimerType
impl Sync for TimerType
impl Unpin for TimerType
impl UnwindSafe for TimerType
impl RefUnwindSafe for TimerType
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<T>
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,