---
title: "seconds(_:)"
framework: swift
role: symbol
role_heading: Type Method
path: "swift/duration/seconds(_:)-311cx"
---

# seconds(_:)

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

## Declaration

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

## Return Value

Return Value A Duration representing a given number of seconds.

## Discussion

Discussion   let d: Duration = .seconds(77)

## See Also

### Creating a duration

- [init(secondsComponent:attosecondsComponent:)](swift/duration/init(secondscomponent:attosecondscomponent:).md)
- [seconds(_:)](swift/duration/seconds(_:)-5ifzr.md)
- [milliseconds(_:)](swift/duration/milliseconds(_:)-1w328.md)
- [milliseconds(_:)](swift/duration/milliseconds(_:)-7ledy.md)
- [microseconds(_:)](swift/duration/microseconds(_:)-1zzcc.md)
- [microseconds(_:)](swift/duration/microseconds(_:)-2majo.md)
