From aa39a94f9c62ec248bed23c949e75155b58d27fd Mon Sep 17 00:00:00 2001 From: Zack Angelo Date: Mon, 15 Jul 2024 09:47:08 -0500 Subject: [PATCH] add gpu start and end time to commandbuffer --- src/commandbuffer.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/commandbuffer.rs b/src/commandbuffer.rs index 26fea2e..f978668 100644 --- a/src/commandbuffer.rs +++ b/src/commandbuffer.rs @@ -66,6 +66,14 @@ impl CommandBufferRef { } } + pub fn gpu_start_time(&self) -> f64 { + unsafe { msg_send![self, GPUStartTime] } + } + + pub fn gpu_end_time(&self) -> f64 { + unsafe { msg_send![self, GPUEndTime] } + } + pub fn set_label(&self, label: &str) { unsafe { let nslabel = crate::nsstring_from_str(label);