We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b9b7d82 commit 8f6c03aCopy full SHA for 8f6c03a
kotlinx-coroutines-core/native/src/Builders.kt
@@ -66,7 +66,7 @@ private class BlockingCoroutine<T>(
66
val parkNanos = eventLoop?.processNextEvent() ?: Long.MAX_VALUE
67
// note: process next even may loose unpark flag, so check if completed before parking
68
if (isCompleted) break
69
- timespec.tv_sec = parkNanos / 1000000000L // 1e9 ns -> sec
+ timespec.tv_sec = (parkNanos / 1000000000L).convert() // 1e9 ns -> sec
70
timespec.tv_nsec = (parkNanos % 1000000000L).convert() // % 1e9
71
nanosleep(timespec.ptr, null)
72
}
0 commit comments