toKotlinDuration

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

Durations less than 104 days are converted exactly, and durations greater than that can lose some precision due to rounding.

Since Kotlin

1.6