pub struct SectionTimer { /* private fields */ }Expand description
Sixteen sections per frame; a result arrives a frame late, and a frame whose map is still in flight measures nothing.
Implementations§
Source§impl SectionTimer
impl SectionTimer
pub fn new(device: &Device, queue: &Queue) -> Option<Self>
pub fn begin_frame(&mut self)
pub fn open( &mut self, encoder: &mut CommandEncoder, name: &'static str, ) -> Option<usize>
pub fn close(&mut self, encoder: &mut CommandEncoder, slot: usize)
Sourcepub fn elapsed(&self, slot: usize) -> Option<Duration>
pub fn elapsed(&self, slot: usize) -> Option<Duration>
The last mapped result for slot while its section keeps the same name.
pub fn resolve(&mut self, encoder: &mut CommandEncoder)
pub fn after_submit(&mut self) -> bool
Auto Trait Implementations§
impl Freeze for SectionTimer
impl !RefUnwindSafe for SectionTimer
impl Send for SectionTimer
impl Sync for SectionTimer
impl Unpin for SectionTimer
impl UnsafeUnpin for SectionTimer
impl !UnwindSafe for SectionTimer
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