while ((sleep = sleepTime - (System.currentTimeMillis() - pictureShownTime)) > 0) { Thread.sleep(sleep);
if (sleepTime > 0) { while ((sleep = sleepTime - (System.currentTimeMillis() - pictureShownTime)) > 0) { Thread.sleep(sleep); }
	public void run() {		running = true;		while (running && !shutdown) {			if (!next(false)) {				// the slideshow is over				hide();				break;			}			try {				long sleep;				while ((sleep = sleepTime - (System.currentTimeMillis() - pictureShownTime)) > 0) {					Thread.sleep(sleep);				}				//Log.log(Log.LEVEL_TRACE, MODULE, "sleepTime: " + sleepTime + " - " + (System.currentTimeMillis() - pictureShownTime));				//Thread.sleep(1000);			} catch (InterruptedException e) {				Log.logException(Log.LEVEL_ERROR, MODULE, e);			}		}	}