Improves logging message for dropped frames
This commit is contained in:
@@ -178,10 +178,10 @@ object ChoreographerHelper {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
val diff = (frameTimeNanos - lastFrameTimeNanos) / 1000000
|
val diff = (frameTimeNanos - lastFrameTimeNanos) / 1000000
|
||||||
if (diff > 16.6f) {
|
if (diff > 20) {
|
||||||
// Follow the frame number
|
// Follow the frame number
|
||||||
val droppedCount = (diff / 16.6).toInt()
|
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
|
lastFrameTimeNanos = frameTimeNanos
|
||||||
Choreographer.getInstance().postFrameCallback(this)
|
Choreographer.getInstance().postFrameCallback(this)
|
||||||
|
|||||||
Reference in New Issue
Block a user