private void waitTime () {
        if (isFirstTimeToDisplay) {
            isFirstTimeToDisplay = false;
            // Wait a little time for gui initial display.
            try {
                Thread.sleep(INPUT_WAITING_TIME_LONG);
            } catch (final InterruptedException e) {
                e.printStackTrace();
            }
            lastRunTime = System.currentTimeMillis();
        } else {
            final long thisRunTime = System.currentTimeMillis();
            final long duration = thisRunTime - lastRunTime;
            if (duration >= 0 && duration < INPUT_WAITING_TIME_SHORT) {
                // Wait a little time for preventing too soon to invoke another
                // display.
                try {
                    Thread.sleep(INPUT_WAITING_TIME_SHORT - duration);
                } catch (final InterruptedException e) {
                    e.printStackTrace();
                }
            }
            lastRunTime = System.currentTimeMillis();
        }
    }