File tree 2 files changed +6
-5
lines changed
kotlinx-coroutines-core/jvm
2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ internal val IDLE_WORKER_KEEP_ALIVE_NS = TimeUnit.SECONDS.toNanos(
52
52
)
53
53
54
54
@JvmField
55
- internal var schedulerTimeSource: TimeSource = NanoTimeSource
55
+ internal var schedulerTimeSource: SchedulerTimeSource = NanoTimeSource
56
56
57
57
/* *
58
58
* Marker indicating that task is CPU-bound and will not block
@@ -108,10 +108,11 @@ internal class TaskImpl(
108
108
// Open for tests
109
109
internal class GlobalQueue : LockFreeTaskQueue <Task >(singleConsumer = false )
110
110
111
- internal abstract class TimeSource {
111
+ // Was previously TimeSource, renamed due to KT-42625 and KT-23727
112
+ internal abstract class SchedulerTimeSource {
112
113
abstract fun nanoTime (): Long
113
114
}
114
115
115
- internal object NanoTimeSource : TimeSource () {
116
+ internal object NanoTimeSource : SchedulerTimeSource () {
116
117
override fun nanoTime () = System .nanoTime()
117
118
}
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
2
+ * Copyright 2016-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
3
3
*/
4
4
5
5
package kotlinx.coroutines.scheduling
6
6
7
7
8
- internal class TestTimeSource (var time : Long ) : TimeSource () {
8
+ internal class TestTimeSource (var time : Long ) : SchedulerTimeSource () {
9
9
10
10
override fun nanoTime () = time
11
11
You can’t perform that action at this time.
0 commit comments