diff --git a/kotlinx-coroutines-core/common/src/Delay.kt b/kotlinx-coroutines-core/common/src/Delay.kt index d95dc52f9f..301ed2d322 100644 --- a/kotlinx-coroutines-core/common/src/Delay.kt +++ b/kotlinx-coroutines-core/common/src/Delay.kt @@ -133,7 +133,6 @@ public suspend fun delay(timeMillis: Long) { * * Implementation note: how exactly time is tracked is an implementation detail of [CoroutineDispatcher] in the context. */ -@ExperimentalTime public suspend fun delay(duration: Duration): Unit = delay(duration.toDelayMillis()) /** Returns [Delay] implementation of the given context */ @@ -143,6 +142,5 @@ internal val CoroutineContext.delay: Delay get() = get(ContinuationInterceptor) * Convert this duration to its millisecond value. * Positive durations are coerced at least `1`. */ -@ExperimentalTime internal fun Duration.toDelayMillis(): Long = if (this > Duration.ZERO) inWholeMilliseconds.coerceAtLeast(1) else 0 diff --git a/kotlinx-coroutines-core/common/src/Timeout.kt b/kotlinx-coroutines-core/common/src/Timeout.kt index 264a2b9d1b..46ab4ae8c8 100644 --- a/kotlinx-coroutines-core/common/src/Timeout.kt +++ b/kotlinx-coroutines-core/common/src/Timeout.kt @@ -64,7 +64,6 @@ public suspend fun withTimeout(timeMillis: Long, block: suspend CoroutineSco * * > Implementation note: how the time is tracked exactly is an implementation detail of the context's [CoroutineDispatcher]. */ -@ExperimentalTime public suspend fun withTimeout(timeout: Duration, block: suspend CoroutineScope.() -> T): T { contract { callsInPlace(block, InvocationKind.EXACTLY_ONCE) @@ -131,7 +130,6 @@ public suspend fun withTimeoutOrNull(timeMillis: Long, block: suspend Corout * * > Implementation note: how the time is tracked exactly is an implementation detail of the context's [CoroutineDispatcher]. */ -@ExperimentalTime public suspend fun withTimeoutOrNull(timeout: Duration, block: suspend CoroutineScope.() -> T): T? = withTimeoutOrNull(timeout.toDelayMillis(), block) diff --git a/kotlinx-coroutines-core/common/src/flow/SharingStarted.kt b/kotlinx-coroutines-core/common/src/flow/SharingStarted.kt index a5ae63667f..0554142408 100644 --- a/kotlinx-coroutines-core/common/src/flow/SharingStarted.kt +++ b/kotlinx-coroutines-core/common/src/flow/SharingStarted.kt @@ -135,7 +135,6 @@ public fun interface SharingStarted { * are negative. */ @Suppress("FunctionName") -@ExperimentalTime public fun SharingStarted.Companion.WhileSubscribed( stopTimeout: Duration = Duration.ZERO, replayExpiration: Duration = Duration.INFINITE diff --git a/kotlinx-coroutines-core/common/src/flow/operators/Delay.kt b/kotlinx-coroutines-core/common/src/flow/operators/Delay.kt index e893f44ea5..258dc3eeb1 100644 --- a/kotlinx-coroutines-core/common/src/flow/operators/Delay.kt +++ b/kotlinx-coroutines-core/common/src/flow/operators/Delay.kt @@ -17,7 +17,6 @@ import kotlin.time.* /* Scaffolding for Knit code examples