← Docs
kotlin-stdlib / kotlin.time / TimeSource / Monotonic / ValueTimeMark / compareTo

compareTo

Common
JVM
JS
Native
1.0
operator fun compareTo ( other : ValueTimeMark ) : Int
(source)

Compares this time mark with the other time mark for order.

  • Returns zero if this time mark represents the same moment of time as the other time mark.
  • Returns a negative number if this time mark is earlier than the other time mark.
  • Returns a positive number if this time mark is later than the other time mark.
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 .