minus

operator fun minus(other: Duration): Duration(source)

Returns a duration whose value is the difference between this and other duration values.

Since Kotlin

1.6

Throws

if the operation results in an undefined value for the given arguments, e.g. when subtracting infinite durations of the same sign.