<!--
{
  "availability" : [
    "macOS: 26.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CompositorServices",
  "identifier" : "/documentation/CompositorServices/cp_frame_predict_timing",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Compositor Services"
    ],
    "preciseIdentifier" : "c:@F@cp_frame_predict_timing"
  },
  "title" : "cp_frame_predict_timing"
}
-->

# cp_frame_predict_timing

Computes and returns the predicted timing information for the frame.

```
cp_frame_timing_tcp_frame_predict_timing(cp_frame_t frame);
```

## Parameters

`frame`

The frame you’re preparing to draw.

## Return Value

The predicted timing information for the specified frame,
or `nil` if the layer is in the [`LayerRenderer.State.paused`](/documentation/CompositorServices/LayerRenderer/State-swift.enum/paused)
or [`LayerRenderer.State.invalidated`](/documentation/CompositorServices/LayerRenderer/State-swift.enum/invalidated) state.

## Discussion

The returned type contains the timing information for the specified frame.
Use related functions to retrieve specific values.
For example, use the [`cp_frame_timing_get_optimal_input_time`](/documentation/CompositorServices/cp_frame_timing_get_optimal_input_time)
function to determine when to start the submission phase of your frame update.
This function updates the frame-specific timing information with the latest data
from Compositor Services before it returns it.

Don’t call this function after you call [`cp_frame_query_drawable`](/documentation/CompositorServices/cp_frame_query_drawable) for the specified frame.
After you retrieve the frame’s [`cp_drawable_t`](/documentation/CompositorServices/cp_drawable_t) type, get the timing information
from the drawable’s [`frameTiming`](/documentation/CompositorServices/LayerRenderer/Drawable/frameTiming) function instead.

---

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)