Contents

gpuEndTime

The host time, in seconds, when the GPU finishes execution of the command buffer.

Declaration

var gpuEndTime: CFTimeInterval { get }

Discussion

You can calculate how much time the GPU spends running a command buffer by subtracting gpuStartTime from this value. Both values are relative to system mach time.

The GPU start and end times remain 0.0 until the GPU finishes running the command buffer. Check this value after the waitUntilCompleted() method returns, or within a completion handler passed to the addCompletedHandler(_:) method.

See Also

Checking execution times on the GPU