<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/Clock",
  "metadataVersion" : "0.1.0",
  "role" : "Protocol",
  "symbol" : {
    "kind" : "Protocol",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:12_Concurrency5ClockP"
  },
  "title" : "Clock"
}
-->

# Clock

A mechanism in which to measure time, and delay work until a given point
in time.

```
protocol Clock<Duration> : Sendable
```

## Overview

Types that conform to the `Clock` protocol define a concept of “now” which
is the specific instant in time that property is accessed. Any pair of calls
to the `now` property may have a minimum duration between them - this
minimum resolution is exposed by the `minimumResolution` property to inform
any user of the type the expected granularity of accuracy.

One of the primary uses for clocks is to schedule task sleeping. This method
resumes the calling task after a given deadline has been met or passed with
a given tolerance value. The tolerance is expected as a leeway around the
deadline. The clock may reschedule tasks within the tolerance to ensure
efficient execution of resumptions by reducing potential operating system
wake-ups. If no tolerance is specified (i.e. nil is passed in) the sleep
function is expected to schedule with a default tolerance strategy.

For more information about specific clocks see `ContinuousClock` and
`SuspendingClock`.

---

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)