package ru.serjik.engine.utils;

public class TimeCounter
{
	private long lastTimeTick = 0;

	public int deltaTimeMillis()
	{
		long currentTimeTick = System.currentTimeMillis();

		int deltaTimeTick = (int) (currentTimeTick - lastTimeTick);

		if (deltaTimeTick > 50)
		{
			deltaTimeTick = 50;
		}

		lastTimeTick = currentTimeTick;

		return deltaTimeTick;
	}

	public float deltaTimeSeconds()
	{
		return deltaTimeMillis() * 0.001f;
	}
}

@@ -53,16 +53,60 @@
 unter%0A%7B%0A
+%09private static final int MAX_DELAY = 100%09;%0A
 %09private
@@ -302,18 +302,25 @@
 eTick %3E 
-50
+MAX_DELAY
 )%0A%09%09%7B%0A%09%09
@@ -340,10 +340,17 @@
 k = 
-50
+MAX_DELAY
 ;%0A%09%09

add constant