Skip to content

Commit 7d123ad

Browse files
committed
docs(suite): Notify users that advanceTimeBy, runCurrent and advanceUntilIdle may be removed in the future
See Kotlin/kotlinx.coroutines#3919 Closes https://gitlab.com/opensavvy/groundwork/prepared/-/issues/51
1 parent 1dca9cd commit 7d123ad

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

suite/src/commonMain/kotlin/Time.kt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ val Time.nowMillis: Long
125125

126126
/**
127127
* Advances the current time by [delay].
128+
*
129+
* ### Stability warning
130+
*
131+
* The KotlinX.Coroutines team is considering removing this functionality.
132+
* Learn more in [#3919](https://github.com/Kotlin/kotlinx.coroutines/issues/3919).
128133
*/
129134
@ExperimentalCoroutinesApi
130135
fun Time.advanceByMillis(delay: Long) {
@@ -145,6 +150,11 @@ fun Time.advanceByMillis(delay: Long) {
145150
* assertEquals(2.minutes, elapsed)
146151
* }
147152
* ```
153+
*
154+
* ### Stability warning
155+
*
156+
* The KotlinX.Coroutines team is considering removing this functionality.
157+
* Learn more in [#3919](https://github.com/Kotlin/kotlinx.coroutines/issues/3919).
148158
*/
149159
@ExperimentalCoroutinesApi
150160
fun Time.advanceBy(delay: Duration) {
@@ -184,6 +194,11 @@ fun Time.advanceBy(delay: Duration) {
184194
*
185195
* This method advances time until all the last [foreground tasks][TestDsl.launch]'s scheduled time.
186196
* There may be [background tasks][TestDsl.launchInBackground] that are scheduled for later.
197+
*
198+
* ### Stability warning
199+
*
200+
* The KotlinX.Coroutines team is considering removing this functionality.
201+
* Learn more in [#3919](https://github.com/Kotlin/kotlinx.coroutines/issues/3919).
187202
*/
188203
@ExperimentalCoroutinesApi
189204
fun Time.advanceUntilIdle() {
@@ -211,6 +226,11 @@ fun Time.advanceUntilIdle() {
211226
* time.runCurrent() // prints "Hello world!"
212227
* }
213228
* ```
229+
*
230+
* ### Stability warning
231+
*
232+
* The KotlinX.Coroutines team is considering removing this functionality.
233+
* Learn more in [#3919](https://github.com/Kotlin/kotlinx.coroutines/issues/3919).
214234
*/
215235
@ExperimentalCoroutinesApi
216236
fun Time.runCurrent() {

0 commit comments

Comments
 (0)