toKotlinDuration

Platform and version requirements: JVM (1.6), JRE8 (1.6)
fun Duration.toKotlinDuration(): Duration

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.

© 2010–2021 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.time/java.time.-duration/to-kotlin-duration.html