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) { } } } }
createCMTExperiment(parentNode, newExperimentName, newExperimentId, trialId, isCloned); }
      public void run() {	synchronized (root) {	  while (true) {	    try {	      long now = System.currentTimeMillis();	      if (updateNeeded && now > nextUpdate) {		save(workspaceFileName);		updateNeeded = false;		root.notifyAll(); // In case anyone's waiting for the update to finish	      } else if (updateNeeded) {		long delay = nextUpdate - now;		if (delay > 0) {		  root.wait(delay);                            }	      } else {		root.wait();	      }	    } catch (InterruptedException ie) {	    }	  }	}      }