com.jtransc.injector.Profiler.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jtransc-utils Show documentation
Show all versions of jtransc-utils Show documentation
JVM AOT compiler currently generating JavaScript, C++, Haxe, with initial focus on Kotlin and games.
package com.jtransc.injector
import com.jtransc.time.measureTime
@Singleton
class Profiler {
inline fun measure(name: String, callback: () -> T): T {
com.jtransc.log.log("$name...")
val (time, result) = measureTime { callback() }
com.jtransc.log.log("Ok ($time)")
return result
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy