experiment.saveToDb(saveToDbConflictHandler); GUIUtils.timeConsumingTaskEnd(organizer); }
synchronized (root) { while (true) { try { long now = System.currentTimeMillis(); if (updateNeeded && now > nextUpdate) { save(workspaceFileName); updateNeeded = false; root.notifyAll(); } else if (updateNeeded) { long delay = nextUpdate - now; if (delay > 0) { root.wait(delay); } } else { root.wait(); } } catch (InterruptedException ie) { } } } }
          public void run() {            experiment.saveToDb(saveToDbConflictHandler); // save under new name            GUIUtils.timeConsumingTaskEnd(organizer);          }