seconds(_:)
Construct a Duration
given a number of seconds represented as a Double
by converting the value into the closest attosecond scale value.
- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
static func seconds(_ seconds: Double) -> Duration
Returns
A Duration
representing a given number of seconds.
let d: Duration = .seconds(22.93)