read

Common
JVM
JS
Native
1.0
protected fun read(): Long
(source)

This protected method should be overridden to return the current reading of the time source expressed as a Long number in the unit specified by the unit property.

Note that the value returned by this method when markNow is called the first time is used as "zero" reading and the difference from this "zero" reading is calculated for subsequent values. Therefore, it's not recommended to return values farther than ±Long.MAX_VALUE from the first returned reading as this will cause this time source flip over future/past boundary for the returned time marks.