<!--
{
  "availability" : [
    "iOS: 10.3.0 -",
    "iPadOS: 10.3.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 10.2.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLCommandBuffer/gpuEndTime",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLCommandBuffer(py)GPUEndTime"
  },
  "title" : "gpuEndTime"
}
-->

# gpuEndTime

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

```
var gpuEndTime: CFTimeInterval { get }
```

## Discussion

You can calculate how much time the GPU spends running a command buffer by subtracting [`gpuStartTime`](/documentation/Metal/MTLCommandBuffer/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()`](/documentation/Metal/MTLCommandBuffer/waitUntilCompleted()) method returns, or within a completion handler passed to the [`addCompletedHandler(_:)`](/documentation/Metal/MTLCommandBuffer/addCompletedHandler(_:)) method.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)