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

# init(uptimeNanoseconds:)

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

```
init(uptimeNanoseconds: UInt64)
```

## Parameters

`uptimeNanoseconds`

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

## Discussion

On Apple platforms, this clock is the same as the value returned by <doc://com.apple.documentation/documentation/kernel/1462446-mach_absolute_time> when converted into nanoseconds.

---

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)