Back to project page OpenGLShadowDemo.
The source code is released under:
MIT License
If you think the Android project OpenGLShadowDemo listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.projectI.openglshadowdemo.common; // w w w . ja v a 2 s .c om import android.util.Log; public class FPSCounter { long startTime = System.nanoTime(); int frames = 0; public void logFrame() { frames++; if(System.nanoTime() - startTime >= 1000000000) { Log.i("FPSCounter", "fps: " + frames); frames = 0; startTime = System.nanoTime(); } } }