← Docs
kotlin-stdlib / kotlin.time / java.time.Duration

Extensions for java.time.Duration

JVM
JRE8
1.6

toKotlinDuration

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

fun Duration . toKotlinDuration ( ) : Duration
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 .