Duration
A duration of time at nanosecond precision.
For many applications, working with specific units like Hours or Seconds is more efficient and plenty adequate. However, when working with larger durations at sub-second precision, overflow is a very real possibility. Duration is capable of representing fixed, nanosecond-precision durations that span the entire supported time scale, making it more suitable for these use cases.
Types
Functions
Checks if this duration is negative.
Checks if this duration is positive.
Breaks this duration down into individual unit components.
Breaks this duration down into individual unit components, assuming a 24-hour day length.
Converts this duration to a kotlin.time.Duration. Since Kotlin's Duration type is based on a floating-point number, precision may be lost.
Returns this duration, rounded down to match the precision of a given unit.
Properties
Extensions
Converts this duration to an equivalent Java Duration.
Converts this duration to an equivalent NSTimeInterval.