---
title: cp_frame_predict_timing
framework: compositorservices
role: symbol
role_heading: Function
path: compositorservices/cp_frame_predict_timing
---

# cp_frame_predict_timing

Computes and returns the predicted timing information for the frame.

## Declaration

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

## Parameters

- `frame`: The frame you’re preparing to draw.

## Mentioned in

Drawing fully immersive content using Metal

## Return Value

Return Value The predicted timing information for the specified frame, or nil if the layer is in the LayerRenderer.State.paused or LayerRenderer.State.invalidated state.

## Discussion

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 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 for the specified frame. After you retrieve the frame’s cp_drawable_t type, get the timing information from the drawable’s frameTiming function instead.

## See Also

### Getting timing information

- [cp_frame_timing_get_optimal_input_time](compositorservices/cp_frame_timing_get_optimal_input_time.md)
- [cp_frame_timing_get_rendering_deadline](compositorservices/cp_frame_timing_get_rendering_deadline.md)
- [cp_frame_timing_get_presentation_time](compositorservices/cp_frame_timing_get_presentation_time.md)
- [cp_frame_timing_t](compositorservices/cp_frame_timing_t.md)
