<!--
{
  "availability" : [
    "macOS: 26.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CompositorServices",
  "identifier" : "/documentation/CompositorServices/LayerRenderer/Clock",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Compositor Services",
      "CompositorServices"
    ],
    "preciseIdentifier" : "s:So27CP_OBJECT_cp_layer_rendererC18CompositorServicesE5ClockV"
  },
  "title" : "LayerRenderer.Clock"
}
-->

# LayerRenderer.Clock

A type that supports operations that require a precise time measurement.

```
struct Clock
```

## Overview

Use this type to perform time-related operations during the rendering of a frame. For example, call [`wait(until:tolerance:)`](/documentation/CompositorServices/LayerRenderer/Clock/wait(until:tolerance:)) to pause your render loop until the optimal rendering time arrives.

## Topics

### Putting the current thread to sleep

[`func wait(until: LayerRenderer.Clock.Instant, tolerance: Duration?)`](/documentation/CompositorServices/LayerRenderer/Clock/wait(until:tolerance:))

Blocks the current thread until the specified time.

### Measuring code execution times

### Configuring clock values

### Creating a clock

[`init()`](/documentation/CompositorServices/LayerRenderer/Clock/init())

Creates a new clock type.

## Relationships

### Conforms To

[`Copyable`](/documentation/Swift/Copyable)

[`Escapable`](/documentation/Swift/Escapable)

[`Clock`](/documentation/Swift/Clock)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

---

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)