getTimeMillis

Native
1.3
@DeprecatedSinceKotlin("1.9") fun getTimeMillis(): Long
(source)
Deprecated: Use measureTime() or TimeSource.Monotonic.markNow() instead.

Gets current system time in milliseconds since certain moment in the past, only delta between two subsequent calls makes sense.

This function is deprecated. To measure the duration of execution of a block of code, use measureTime or measureTimedValue instead. To mark a point in time for querying the duration of time interval elapsed from that point, use TimeSource.Monotonic.markNow instead. The resulting Duration then can be expressed as a Long number of milliseconds using Duration.inWholeMilliseconds.