← Docs
kotlin-stdlib / kotlin.time / java.util.concurrent.TimeUnit

Extensions for java.util.concurrent.TimeUnit

JVM
1.8

toDurationUnit

Converts this java.util.concurrent.TimeUnit enum value to the corresponding kotlin.time.DurationUnit value.

fun TimeUnit . toDurationUnit ( ) : DurationUnit
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 .