由于测试需求,要获得获得打印cocos2dx游戏中左下角的fps值。尝试方法
1.在lua代码中开全局定时,记录director:getAnimationInterval() 不可行,获取的只是相对于director->setAnimationInterval(1.0/60)的固定值
2.cc.Director:getInstance():getSecondsPerFrame() 的倒数,保存在table中,在一轮结束后传给log,也不可行。其值在100~2000
3.在cocos2dx中显示的fps值,并不是实时的值,只是在一小段时间的平均值
What cocos2d displays as fps is not an accurate representation of the s