开发者

How to benchmark the fps of an animation in android?

开发者 https://www.devze.com 2023-04-03 21:11 出处:网络
It would be real开发者_如何学运维ly cool to benchmark how many times per second an animation actually gets drawn to the screen in an android app. Is there a way to do it?

It would be real开发者_如何学运维ly cool to benchmark how many times per second an animation actually gets drawn to the screen in an android app. Is there a way to do it?

ie. I can set an animation to run over a 250ms period, but I want to benchmark how smooth it is objectively.


If you have a game loop running, you can calculate the framerate as follows:

FrameRate= 1000/LoopTime

Where LoopTime is the time it takes to execute an Update call and Draw call.

0

精彩评论

暂无评论...
验证码 换一张
取 消