<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Dispatch",
  "identifier" : "/documentation/Dispatch/DispatchTime",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Dispatch"
    ],
    "preciseIdentifier" : "s:8Dispatch0A4TimeV"
  },
  "title" : "DispatchTime"
}
-->

# DispatchTime

A point in time relative to the default clock, with nanosecond precision.

```
struct DispatchTime
```

## Overview

On Apple platforms, the default clock is based on the Mach absolute time unit.

## Topics

### Getting Well-Known Times

[`now()`](/documentation/Dispatch/DispatchTime/now())

Returns the current time.

[`distantFuture`](/documentation/Dispatch/DispatchTime/distantFuture)

A time in the distant future.

### Creating a Dispatch Time Object

[`init(uptimeNanoseconds:)`](/documentation/Dispatch/DispatchTime/init(uptimeNanoseconds:))

Creates a time relative to the amount of time the system has been running.

### Getting the Time

[`rawValue`](/documentation/Dispatch/DispatchTime/rawValue)

Returns the underlying time value.

[`uptimeNanoseconds`](/documentation/Dispatch/DispatchTime/uptimeNanoseconds)

Returns the number of nanoseconds since boot, excluding any time the system spent asleep.

### Modifying the Value

[`advanced(by:)`](/documentation/Dispatch/DispatchTime/advanced(by:))

[`distance(to:)`](/documentation/Dispatch/DispatchTime/distance(to:))

### Operator Functions

[`+(_:_:)`](/documentation/Dispatch/+(_:_:)-6fmcc)

[`+(_:_:)`](/documentation/Dispatch/+(_:_:)-2dcrq)

[`-(_:_:)`](/documentation/Dispatch/-(_:_:)-5l4yh)

[`-(_:_:)`](/documentation/Dispatch/-(_:_:)-8usj3)



---

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)
