private void computeFrameRate ( Timing updateFpsTimer , long lastTime , long currentTime ) { if ( updateFpsTimer . elapsed ( Constant . ONE_SECOND_IN_MILLI ) ) { currentFrameRate = ( int ) Math . round ( Constant . ONE_SECOND_IN_NANO / ( double ) ( currentTime - lastTime ) ) ; updateFpsTimer . restart ( ) ; } }
Compute the frame rate depending of the game loop speed .