Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java how to get fps

long frames, fps, fpsTimer;
public final void calculateFps() {
	frames++;
	if(System.currentTimeMillis() - fpsTimer < 1000L) return;
	fpsTimer = System.currentTimeMillis();
	fps      = frames;
	frames   = 0L;
}
 
PREVIOUS NEXT
Tagged: #java #fps
ADD COMMENT
Topic
Name
3+9 =