---
title: "nanoseconds(_:)"
framework: swift
role: symbol
role_heading: Type Method
path: "swift/duration/nanoseconds(_:)-8nsaz"
---

# nanoseconds(_:)

Construct a Duration given a number of nanoseconds represented as a BinaryInteger.

## Declaration

```swift
static func nanoseconds<T>(_ nanoseconds: T) -> Duration where T : BinaryInteger
```

## Return Value

Return Value A Duration representing a given number of nanoseconds.

## Discussion

Discussion   let d: Duration = .nanoseconds(1929)
