mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-03-29 19:21:52 +01:00
Improves logging message for dropped frames
This commit is contained in:
parent
47a9a6cc4e
commit
87b8e18f1c
@ -178,10 +178,10 @@ object ChoreographerHelper {
|
||||
return
|
||||
}
|
||||
val diff = (frameTimeNanos - lastFrameTimeNanos) / 1000000
|
||||
if (diff > 16.6f) {
|
||||
if (diff > 20) {
|
||||
// Follow the frame number
|
||||
val droppedCount = (diff / 16.6).toInt()
|
||||
Log.w("block-canary", "Dropped Frames $droppedCount")
|
||||
Log.w("block-canary", "Dropped $droppedCount frames. Skipped $diff ms")
|
||||
}
|
||||
lastFrameTimeNanos = frameTimeNanos
|
||||
Choreographer.getInstance().postFrameCallback(this)
|
||||
|
Loading…
x
Reference in New Issue
Block a user