description
- iOS
- 16.0+
- macOS
- 13.0+
- tvOS
- 16.0+
- watchOS
- 9.0+
var description: String { get }var description: String { get }import Swift@frozen struct DurationA representation of high precision time.
@frozen struct StringA Unicode string value that is a collection of characters.
init(from decoder: any Decoder) throws init(secondsComponent: Int64, attosecondsComponent: Int64) Construct a Duration by adding attoseconds to a seconds value.
static var zero: Duration { get }static func microseconds(_ microseconds: Double) -> Duration Construct a Duration given a number of seconds microseconds as a Double by converting the value into the closest attosecond scale value.
static func microseconds<T>(_ microseconds: T) -> Duration where T : BinaryInteger Construct a Duration given a number of microseconds represented as a BinaryInteger.
static func milliseconds(_ milliseconds: Double) -> Duration Construct a Duration given a number of seconds milliseconds as a Double by converting the value into the closest attosecond scale value.
static func milliseconds<T>(_ milliseconds: T) -> Duration where T : BinaryInteger Construct a Duration given a number of milliseconds represented as a BinaryInteger.
static func nanoseconds<T>(_ nanoseconds: T) -> Duration where T : BinaryInteger Construct a Duration given a number of nanoseconds represented as a BinaryInteger.
static func seconds(_ seconds: Double) -> Duration Construct a Duration given a number of seconds represented as a Double by converting the value into the closest attosecond scale value.
static func seconds<T>(_ seconds: T) -> Duration where T : BinaryInteger Construct a Duration given a number of seconds represented as a BinaryInteger.
var components: (seconds: Int64, attoseconds: Int64) { get }The composite components of the Duration.
static func * (lhs: Duration, rhs: Double) -> Duration static func * <T>(lhs: Duration, rhs: T) -> Duration where T : BinaryInteger static func *= <T>(lhs: inout Duration, rhs: T) where T : BinaryInteger static func + (lhs: Duration, rhs: Duration) -> Duration static func += (lhs: inout Duration, rhs: Duration) static func - (lhs: Duration, rhs: Duration) -> Duration static func -= (lhs: inout Duration, rhs: Duration) static func / (lhs: Duration, rhs: Double) -> Duration static func / <T>(lhs: Duration, rhs: T) -> Duration where T : BinaryInteger static func / (lhs: Duration, rhs: Duration) -> Double static func /= (lhs: inout Duration, rhs: Double) static func /= <T>(lhs: inout Duration, rhs: T) where T : BinaryInteger static func < (lhs: Duration, rhs: Duration) -> Bool static func == (lhs: Duration, rhs: Duration) -> Bool func encode(to encoder: any Encoder) throws func hash(into hasher: inout Hasher)