java game calculate fps

java game calculate fps
long frames, fps, fpsTimer;
public final void calculateFps() {
	frames++;
	if(System.currentTimeMillis() - fpsTimer < 1000L) return;
	fpsTimer = System.currentTimeMillis();
	fps      = frames;
	frames   = 0L;
}
S‮www:ecruo‬.lautturi.com
Created Time:2017-09-19 14:59:23  Author:lautturi