@@ -27,7 +27,6 @@ import kotlin.time.Duration.Companion.milliseconds
27
27
* virtual time as needed (via [advanceUntilIdle]), or run the tasks that are scheduled to run as soon as possible but
28
28
* haven't yet been dispatched (via [runCurrent]).
29
29
*/
30
- @ExperimentalCoroutinesApi
31
30
public class TestCoroutineScheduler : AbstractCoroutineContextElement (TestCoroutineScheduler ),
32
31
CoroutineContext .Element {
33
32
@@ -109,11 +108,10 @@ public class TestCoroutineScheduler : AbstractCoroutineContextElement(TestCorout
109
108
* Runs the enqueued tasks in the specified order, advancing the virtual time as needed until there are no more
110
109
* tasks associated with the dispatchers linked to this scheduler.
111
110
*
112
- * A breaking change from [ TestCoroutineDispatcher.advanceTimeBy] is that it no longer returns the total number of
111
+ * A breaking change from ` TestCoroutineDispatcher.advanceTimeBy` is that it no longer returns the total number of
113
112
* milliseconds by which the execution of this method has advanced the virtual time. If you want to recreate that
114
113
* functionality, query [currentTime] before and after the execution to achieve the same result.
115
114
*/
116
- @ExperimentalCoroutinesApi
117
115
public fun advanceUntilIdle (): Unit = advanceUntilIdleOr { events.none(TestDispatchEvent <* >::isForeground) }
118
116
119
117
/* *
@@ -129,7 +127,6 @@ public class TestCoroutineScheduler : AbstractCoroutineContextElement(TestCorout
129
127
/* *
130
128
* Runs the tasks that are scheduled to execute at this moment of virtual time.
131
129
*/
132
- @ExperimentalCoroutinesApi
133
130
public fun runCurrent () {
134
131
val timeMark = synchronized(lock) { currentTime }
135
132
while (true ) {
@@ -165,7 +162,6 @@ public class TestCoroutineScheduler : AbstractCoroutineContextElement(TestCorout
165
162
*
166
163
* @throws IllegalArgumentException if passed a negative [delay][delayTime].
167
164
*/
168
- @ExperimentalCoroutinesApi
169
165
public fun advanceTimeBy (delayTime : Duration ) {
170
166
require(! delayTime.isNegative()) { " Can not advance time by a negative delay: $delayTime " }
171
167
val startingTime = currentTime
@@ -227,7 +223,6 @@ public class TestCoroutineScheduler : AbstractCoroutineContextElement(TestCorout
227
223
/* *
228
224
* Returns the [TimeSource] representation of the virtual time of this scheduler.
229
225
*/
230
- @ExperimentalCoroutinesApi
231
226
@ExperimentalTime
232
227
public val timeSource: TimeSource = object : AbstractLongTimeSource (DurationUnit .MILLISECONDS ) {
233
228
override fun read (): Long = currentTime
0 commit comments