We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c840d6 commit 9749b8cCopy full SHA for 9749b8c
kotlinx-coroutines-core/native/src/EventLoop.kt
@@ -4,7 +4,7 @@ package kotlinx.coroutines
4
5
import kotlin.coroutines.*
6
import kotlin.native.concurrent.*
7
-import kotlin.system.*
+import kotlin.time.*
8
9
internal actual abstract class EventLoopImplPlatform : EventLoop() {
10
@@ -26,5 +26,6 @@ internal class EventLoopImpl: EventLoopImplBase() {
26
27
internal actual fun createEventLoop(): EventLoop = EventLoopImpl()
28
29
-@Suppress("DEPRECATION")
30
-internal actual fun nanoTime(): Long = getTimeNanos()
+private val startingPoint = TimeSource.Monotonic.markNow()
+
31
+internal actual fun nanoTime(): Long = (TimeSource.Monotonic.markNow() - startingPoint).inWholeNanoseconds
0 commit comments