@Override
		public void run() {
			long previousTime = System.nanoTime();
			
			while(!stopThread) {
				final long nanoTime = System.nanoTime();
				final long elapsedTime = nanoTime - previousTime;
				previousTime = nanoTime;
				
				if (!paused) {
					fireUpdateEvent(elapsedTime);
					totalTime += elapsedTime;
					
					if(totalTime >= timePerTick) {
						if (!tick) {
							tick = true;
							++totalTicks;
							fireTickEvent();
						}
						else if(totalTime > timePerTick + allowedTimeDifference) {
							totalTime -= timePerTick;
							tick = false;
							//fireEvent
						}
					}
				}
			}
		}