getTimeNanos

external fun getTimeNanos(): Long(source)

Deprecated

Warning since 1.9

Error since 2.1

Use measureTime() or TimeSource.Monotonic.markNow() instead.

Gets current system time in nanoseconds 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 nanoseconds using Duration.inWholeNanoseconds.

Since Kotlin

1.3