toJavaDuration

Converts kotlin.time.Duration value to java.time.Duration value.

An infinite duration is converted to either Long.MAX_VALUE, or Long.MIN_VALUE seconds, depending on its sign.

Since Kotlin

1.6