sampleTimestamps()
Captures and returns a CPU timestamp and a GPU timestamp from the same moment in time.
Declaration
func sampleTimestamps() -> (cpu: MTLTimestamp, gpu: MTLTimestamp)Mentioned in
Return Value
A tuple that contains the CPU and GPU timestamps.
cpuA timestamp from the CPU.
gpuA timestamp from the GPU the device instance represents.
Discussion
For an example of how and when to use corresponding timestamps from the CPU and GPU, see Converting GPU timestamps into CPU time.