← Docs
kotlin-stdlib / kotlin.time / toJavaDuration

toJavaDuration

JVM
JRE8
1.6
fun Duration . toJavaDuration ( ) : Duration
(source)

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

Durations greater than Long.MAX_VALUE seconds are cut to that value.

Stay in touch:
  • Contributing to Kotlin
  • Releases
  • Press Kit
  • Security
  • Blog
  • Issue Tracker
  • Brand assets
  • Careers
Supported and developed by JetBrains .
Kotlin™ is protected under the Kotlin Foundation
and licensed under the Apache 2 license .