@@ -0,0 +1,1670 @@
+/*%0A * Copyright 2014 Victor Melnik %3Cannimon119@gmail.com%3E, and%0A * individual contributors as indicated by the @authors tag.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.annimon.jecp;%0A%0A/**%0A *%0A * @author aNNiMON%0A */%0Apublic class Fps %7B%0A%0A    private static final int MAX_FPS = 30;%0A    private static final int MAX_DELAY = 1000 / MAX_FPS;%0A%0A    private static long currentFps;%0A    private static long counter = 0, startTime = 0;%0A    private static long startTimeForMeasureDelay = 0;%0A%0A    public static long getFps() %7B%0A        counter++;%0A        if (startTime == 0) %7B%0A            startTime = System.currentTimeMillis();%0A        %7D%0A        if ((System.currentTimeMillis() - startTime) %3E= 1000) %7B%0A            currentFps = counter;%0A            counter = 0;%0A            startTime = System.currentTimeMillis();%0A        %7D%0A        return currentFps;%0A    %7D%0A%0A    public static void startMeasuringDelay() %7B%0A        startTimeForMeasureDelay = System.currentTimeMillis();%0A    %7D%0A%0A    public static long getDelay() %7B%0A        long delay = System.currentTimeMillis() - startTimeForMeasureDelay;%0A        return (delay %3E MAX_DELAY ? 0 : MAX_DELAY - delay);%0A    %7D%0A%7D%0A

Add Fps class