compareTo

open operator override 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.

Since Kotlin

1.9

Throws

if time marks were obtained from different time sources.