public void run() {
		long nextFrameTicks = System.currentTimeMillis();
		int framesSkipped;
		float interpol;
		
		while (running) {
			framesSkipped = 0;
//			Profiler.start();
			while ((System.currentTimeMillis() > nextFrameTicks) && (framesSkipped < MAX_FRAMESKIP)) {
				updateTime = System.nanoTime();
				update();
				updateTime = System.nanoTime() - updateTime;
				addUpdateEntry(updateTime);
				
				nextFrameTicks += TICKS_PER_FRAME;
				
				framesSkipped++;
			}
//			Profiler.lapRestart("Update");
			
			long systemMil = System.currentTimeMillis();
			long num = systemMil + TICKS_PER_FRAME - nextFrameTicks;
			interpol= ((float)(num))/((float)(TICKS_PER_FRAME));
			
			tempRenderTime = System.nanoTime();
			render(interpol);
			renderTime = System.nanoTime() - tempRenderTime;
			addRenderEntry(renderTime);
//			Profiler.lap("Draw");
		}
	}