aboutsummaryrefslogtreecommitdiffstats
path: root/kotlinx-coroutines-core/common/src/Delay.kt
diff options
context:
space:
mode:
Diffstat (limited to 'kotlinx-coroutines-core/common/src/Delay.kt')
-rw-r--r--kotlinx-coroutines-core/common/src/Delay.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/kotlinx-coroutines-core/common/src/Delay.kt b/kotlinx-coroutines-core/common/src/Delay.kt
index 53dadf97..4543c5dd 100644
--- a/kotlinx-coroutines-core/common/src/Delay.kt
+++ b/kotlinx-coroutines-core/common/src/Delay.kt
@@ -150,4 +150,4 @@ internal val CoroutineContext.delay: Delay get() = get(ContinuationInterceptor)
*/
@ExperimentalTime
internal fun Duration.toDelayMillis(): Long =
- if (this > Duration.ZERO) toLongMilliseconds().coerceAtLeast(1) else 0
+ if (this > Duration.ZERO) inWholeMilliseconds.coerceAtLeast(1) else 0