Skip to content

Commit e398103

Browse files
author
Abduqodiri Qurbonzoda
committed
Replace deprecated kotlin.native.internal.GC with kotlin.native.runtime.GC
1 parent fd4d345 commit e398103

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

runtime/build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ kotlin {
5555
languageSettings {
5656
progressiveMode = true
5757
optIn('kotlin.experimental.ExperimentalNativeApi')
58+
optIn("kotlin.native.runtime.NativeRuntimeApi")
5859
optIn("kotlinx.cinterop.ExperimentalForeignApi")
5960
}
6061
}

runtime/nativeMain/src/kotlinx/benchmark/native/NativeExecutor.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package kotlinx.benchmark.native
22

33
import kotlinx.benchmark.*
4-
import kotlin.native.internal.GC
4+
import kotlin.native.runtime.GC
55
import kotlin.time.*
66

77
class NativeExecutor(
@@ -218,7 +218,6 @@ class NativeExecutor(
218218
return getStackTrace().joinToString("\n") + "\nCause: ${nested.message}\n" + nested.stacktrace()
219219
}
220220

221-
@OptIn(ExperimentalTime::class)
222221
private inline fun measure(
223222
cycles: Int,
224223
nativeGCAfterIteration: Boolean,
@@ -239,7 +238,6 @@ class NativeExecutor(
239238
return duration.toDouble(DurationUnit.NANOSECONDS) / cycles
240239
}
241240

242-
@OptIn(ExperimentalTime::class)
243241
private inline fun <T> measureWarmup(
244242
name: String,
245243
config: BenchmarkConfiguration,

0 commit comments

Comments
 (0)