protected void waitForAnimation(FGController controller) {

		VisualGraphViewUpdater<FGVertex, FGEdge> updater = getGraphUpdater();
		if (updater == null) {
			return; // nothing to wait for; no active graph
		}

//		long start = System.nanoTime();

		waitForSwing();

		int tryCount = 3;
		while (tryCount++ < 5 && updater.isBusy()) {
			waitForConditionWithoutFailing(() -> !updater.isBusy());
		}
		waitForSwing();

		assertFalse(updater.isBusy());

//		long end = System.nanoTime();
//		long total = end - start;
//		Msg.debug(this,
//			"Animation wait time: " + TimeUnit.MILLISECONDS.convert(total, TimeUnit.NANOSECONDS));
	}
Waits for the run manager and any animation.
Ghidra/Features/FunctionGraph/src/test.slow/java/ghidra/app/plugin/core/functiongraph/AbstractFunctionGraphTest.java