We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd6d6dc commit cf8403cCopy full SHA for cf8403c
kotlinx-coroutines-core/src/test/kotlin/guide/test/TestUtil.kt
@@ -152,6 +152,7 @@ private class ThreadStatus {
152
153
private val MAX_WAIT_NANOS = 10_000_000_000L // 10s
154
private val REAL_TIME_STEP_NANOS = 200_000_000L // 200 ms
155
+private val REAL_PARK_NANOS = 10_000_000L // 10 ms -- park for a little to better track real-time
156
157
@Suppress("PLATFORM_CLASS_MAPPED_TO_KOTLIN")
158
private class TestTimeSource(
@@ -210,7 +211,7 @@ private class TestTimeSource(
210
211
status.permit = false
212
break
213
}
- LockSupport.parkNanos(blocker, REAL_TIME_STEP_NANOS)
214
+ LockSupport.parkNanos(blocker, REAL_PARK_NANOS)
215
216
217
0 commit comments