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

# seconds(_:)

Construct a Duration given a number of seconds represented as a Double by converting the value into the closest attosecond scale value.

## Declaration

```swift
static func seconds(_ seconds: Double) -> Duration
```

## Return Value

Return Value A Duration representing a given number of seconds.

## Discussion

Discussion   let d: Duration = .seconds(22.93)

## See Also

### Creating a duration

- [init(secondsComponent:attosecondsComponent:)](swift/duration/init(secondscomponent:attosecondscomponent:).md)
- [seconds(_:)](swift/duration/seconds(_:)-311cx.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)
