---
title: LayerRenderer.Clock
framework: compositorservices
role: symbol
role_heading: Structure
path: compositorservices/layerrenderer/clock
---

# LayerRenderer.Clock

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

## Declaration

```swift
struct Clock
```

## Overview

Overview Use this type to perform time-related operations during the rendering of a frame. For example, call wait(until:tolerance:) to pause your render loop until the optimal rendering time arrives.

## Topics

### Putting the current thread to sleep

- [wait(until:tolerance:)](compositorservices/layerrenderer/clock/wait(until:tolerance:).md)

### Creating a clock

- [init()](compositorservices/layerrenderer/clock/init().md)

## Relationships

### Conforms To

- [Clock](swift/clock.md)
- [Copyable](swift/copyable.md)
- [Escapable](swift/escapable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Managing the rendering loop

- [state](compositorservices/layerrenderer/state-swift.property.md)
- [waitUntilRunning()](compositorservices/layerrenderer/waituntilrunning().md)
- [LayerRenderer.State](compositorservices/layerrenderer/state-swift.enum.md)
