@Override
	public void run() {
		Thread thisThread = Thread.currentThread();
		long beforeTime, timeDiff, sleep;
		list = model.getArray();
		while (state == State.START && animator == thisThread) {

			beforeTime = System.currentTimeMillis();
			timeDiff = System.currentTimeMillis() - beforeTime;
			sleep = delay - timeDiff;
			if (sleep < 0) {
				sleep = 2;
			}
			try {
				Thread.sleep(sleep);
				if (state == State.PAUSE) {
					synchronized (this) {
						while (state == State.PAUSE && animator == thisThread)
							wait();
					}
				}
			} catch (InterruptedException e) {
				System.out.println("Interrupted: " + e.getMessage());
			}

			beforeTime = System.currentTimeMillis();
		}
	}