core-ktx / androidx.time / java.time.Duration

Extensions for java.time.Duration

component1

operator fun Duration.component1(): Long

Return the seconds component of this Duration.

component2

operator fun Duration.component2(): Int

Returns the nanosecond offset of this Duration.

div

operator fun Duration.div(divisor: Long): Duration

Divide this Duration by the divisor.

times

operator fun Duration.times(multiplicand: Long): Duration

Multiply this Duration by the multiplicand.

unaryMinus

operator fun Duration.unaryMinus(): Duration

Negate this Duration.