Browse Source

Move try

igor.demin/new-york-bench-without-window
Igor Demin 1 year ago
parent
commit
37d0f7226b
  1. 8
      benchmarks/ios/visual-effects-ny/shared/src/commonMain/kotlin/HappyNY.kt

8
benchmarks/ios/visual-effects-ny/shared/src/commonMain/kotlin/HappyNY.kt

@ -340,11 +340,11 @@ fun measureHappyNY(
frameCount: Int = 1000 frameCount: Int = 1000
): Duration { ): Duration {
val scene = ComposeScene() val scene = ComposeScene()
scene.setContent {
NYContent()
}
val surface = org.jetbrains.skia.Surface.makeNull(width, height)
try { try {
scene.setContent {
NYContent()
}
val surface = org.jetbrains.skia.Surface.makeNull(width, height)
return kotlin.time.measureTime { return kotlin.time.measureTime {
var nanoTime = 0L var nanoTime = 0L
repeat(frameCount) { repeat(frameCount) {

Loading…
Cancel
Save