Merge pull request #12682 from soonbro:patch-1

This commit is contained in:
Alexander Alekhin 2018-09-29 16:03:38 +03:00 committed by GitHub
commit ee84ae0551
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,7 @@ public class FpsMeter {
private static final int STEP = 20;
private static final DecimalFormat FPS_FORMAT = new DecimalFormat("0.00");
private int mFramesCouner;
private int mFramesCounter;
private double mFrequency;
private long mprevFrameTime;
private String mStrfps;
@ -24,7 +24,7 @@ public class FpsMeter {
int mHeight = 0;
public void init() {
mFramesCouner = 0;
mFramesCounter = 0;
mFrequency = Core.getTickFrequency();
mprevFrameTime = Core.getTickCount();
mStrfps = "";
@ -39,8 +39,8 @@ public class FpsMeter {
init();
mIsInitialized = true;
} else {
mFramesCouner++;
if (mFramesCouner % STEP == 0) {
mFramesCounter++;
if (mFramesCounter % STEP == 0) {
long time = Core.getTickCount();
double fps = STEP * mFrequency / (time - mprevFrameTime);
mprevFrameTime = time;