<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLCommandBufferError-swift.struct/Code/timeout",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:@E@MTLCommandBufferError@MTLCommandBufferErrorTimeout"
  },
  "title" : "MTLCommandBufferError.Code.timeout"
}
-->

# MTLCommandBufferError.Code.timeout

An error code that indicates the system interrupted and terminated the command buffer before it finished running.

```
case timeout
```

## Discussion

Possible causes include:

- The commands in the buffer took more time to run than the system allows.
- The command buffer timed out waiting for another workload to signal an [`MTLEvent`](/documentation/Metal/MTLEvent).

---

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)