v1.8.10
  • Solutions
    • Multiplatform
    • Server-side
    • Data science
    • Android
  • Docs
  • Community
  • Teach
  • Play
    • Playground
    • Hands-on
    • Examples
    • Koans
← 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
Kotlin™ is protected under the Kotlin Foundation and licensed under the Apache 2 license.
Supported and developed by JetBrains