Struct wgpu::PresentationTimestamp
source · pub struct PresentationTimestamp(pub u128);
Expand description
Nanosecond timestamp used by the presentation engine.
The specific clock depends on the window system integration (WSI) API used.
WSI | Clock |
IDXGISwapchain | QueryPerformanceCounter |
IPresentationManager | QueryInterruptTimePrecise |
CAMetalLayer | mach_absolute_time |
VK_GOOGLE_display_timing | clock_gettime(CLOCK_MONOTONIC) |
Tuple Fields§
§0: u128
Timestamp in nanoseconds.
Implementations§
source§impl PresentationTimestamp
impl PresentationTimestamp
sourcepub const INVALID_TIMESTAMP: PresentationTimestamp = _
pub const INVALID_TIMESTAMP: PresentationTimestamp = _
A timestamp that is invalid due to the platform not having a timestamp system.
sourcepub fn is_invalid(self) -> bool
pub fn is_invalid(self) -> bool
Returns true if this timestamp is the invalid timestamp.
Trait Implementations§
source§impl Clone for PresentationTimestamp
impl Clone for PresentationTimestamp
source§fn clone(&self) -> PresentationTimestamp
fn clone(&self) -> PresentationTimestamp
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for PresentationTimestamp
impl Debug for PresentationTimestamp
source§impl Ord for PresentationTimestamp
impl Ord for PresentationTimestamp
source§fn cmp(&self, other: &PresentationTimestamp) -> Ordering
fn cmp(&self, other: &PresentationTimestamp) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for PresentationTimestamp
impl PartialEq for PresentationTimestamp
source§fn eq(&self, other: &PresentationTimestamp) -> bool
fn eq(&self, other: &PresentationTimestamp) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for PresentationTimestamp
impl PartialOrd for PresentationTimestamp
source§fn partial_cmp(&self, other: &PresentationTimestamp) -> Option<Ordering>
fn partial_cmp(&self, other: &PresentationTimestamp) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for PresentationTimestamp
impl Eq for PresentationTimestamp
impl StructuralEq for PresentationTimestamp
impl StructuralPartialEq for PresentationTimestamp
Auto Trait Implementations§
impl RefUnwindSafe for PresentationTimestamp
impl Send for PresentationTimestamp
impl Sync for PresentationTimestamp
impl Unpin for PresentationTimestamp
impl UnwindSafe for PresentationTimestamp
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.