Duration

expect class Duration

A measurement of time. Durations may be positive, zero, or negative.

Positive durations are measured in seconds, with both #getSeconds and #getNano parts with non-negative signs.

Negative durations may be surprising. The #getSeconds property is negative, but the #getNano property is non-negative! To represent -1.3 seconds the seconds property is -2 and the nanos property is 700,000,000.

actual class Duration
actual typealias Duration = java.time.Duration
actual class Duration

Functions

equals
Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
expect fun getNano(): Int

Returns a value in [0..1,000,000,000).

actual fun getNano(): Int
actual fun getNano(): Int
Link copied to clipboard
expect fun getSeconds(): Long
actual fun getSeconds(): Long
actual fun getSeconds(): Long
hashCode
Link copied to clipboard
open override fun hashCode(): Int
open override fun hashCode(): Int