package com.ezardlabs.dethsquare;

import com.ezardlabs.dethsquare.util.GameListeners;
import com.ezardlabs.dethsquare.util.GameListeners.UpdateListener;

public final class Time {
	/**
	 * Add hook into game loop
	 */
	static {
		GameListeners.addUpdateListener(new UpdateListener() {
			long last = 0;
			@Override
			public void onUpdate() {
				long now = System.currentTimeMillis();
				deltaTime = now - last;
				last = now;
			}
		});
	}
	/**
	 * The time in seconds it took to complete the last frame
	 */
	public static float deltaTime;
	/**
	 * The total number of frames that have passed
	 */
	public static long frameCount;
	/**
	 * The time at the beginning of this frame. This is the time in seconds since the start of the game
	 */
	public static float time;
}

@@ -175,23 +175,29 @@
 Time %7B%0A%09
-/**%0A%09 *
+static %7B%0A%09%09//
  Add hoo
@@ -217,23 +217,8 @@
 oop%0A
-%09 */%0A%09static %7B%0A
 %09%09Ga
@@ -416,16 +416,34 @@
  = now;%0A
+%09%09%09%09frameCount++;%0A
 %09%09%09%7D%0A%09%09%7D

Update frame count