pub fn wait(&self, timeout: Option<Duration>) -> VkResult<VkSuccess> {
        // if self.signaled.load(Ordering::Relaxed) {
        //   return Ok(());
        // }

        let timeout_ns = if let Some(timeout) = timeout {
            timeout
                .as_secs()
                .saturating_mul(1_000_000_000)
                .saturating_add(timeout.subsec_nanos() as u64)
        } else {
            u64::MAX
        };

        self.vd.wait_for_fences(&[self.object()], true, timeout_ns)
    }
/// Waits until the fence is signaled, or at least until the timeout duration
/// has elapsed.
///
/// Returns `Ok` if the fence is now signaled. Returns `Err` if the timeout
/// was reached instead.
///
/// If you pass a duration of 0, then the function will return without
/// blocking.
Waits until the fence is signaled, or at least until the timeout duration
has elapsed.

Returns `Ok` if the fence is now signaled. Returns `Err` if the timeout
was reached instead.

If you pass a duration of 0, then the function will return without
blocking.
Waits until the fence is signaled or at least until the timeout duration has elapsed . Returns ` Ok ` if the fence is now signaled . Returns ` Err ` if the timeout was reached instead . If you pass a duration of 0 then the function will return without blocking .
pub fn wait(&self, timeout: Option<Duration>) -> VkResult<VkSuccess> {
        // if self.signaled.load(Ordering::Relaxed) {
        //   return Ok(());
        // }
        let timeout_ns = if let Some(timeout) = timeout {
            timeout
                .as_secs()
                .saturating_mul(1_000_000_000)
                .saturating_add(timeout.subsec_nanos() as u64)
        } else {
            u64::MAX
        };
        self.vd.wait_for_fences(&[self.object()], true, timeout_ns)
    }
pub fn wait ( & self , timeout : Option < Duration > ) -> VkResult < VkSuccess > { // if self.signaled.load(Ordering::Relaxed) { //   return Ok(()); // } let timeout_ns = if let Some ( timeout ) = timeout { timeout . as_secs ( ) . saturating_mul ( 1_000_000_000 ) . saturating_add ( timeout . subsec_nanos ( ) as u64 ) } else { u64 :: MAX } ; self . vd . wait_for_fences ( & [ self . object ( ) ] , true , timeout_ns ) }
Waits until the fence is signaled, or at least until the timeout duration
has elapsed.
Waits until the fence is signaled or at least until the timeout duration has elapsed .
&self
timeout
Option<Duration>
&self
timeout
Option<Duration>