better delay handling

This commit is contained in:
minjaesong
2024-08-12 02:04:54 +09:00
parent 3a7b7d0b30
commit 96012eea52

View File

@@ -258,7 +258,13 @@ open class GraphicsAdapter(private val assetsRoot: String, val vm: VM, val confi
protected var slpcnt = 0L
fun applyDelay() {
@SuppressWarnings("inline")
internal inline fun applyDelay() {
if (sleepMillis == 0L && sleepNanos == 0) return
applyDelay0()
}
internal fun applyDelay0() {
slpcnt += sleepMillis * 1000000L + sleepNanos
val millis = slpcnt / 1000000L