compareTo

Common
JVM
JS
Native
1.0
open operator fun compareTo(other: ComparableTimeMark): 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.

Note that the other time mark must be obtained from the same time source as this one.

Exceptions

IllegalArgumentException - if time marks were obtained from different time sources.