public static TimeoutTaskMonitor timeoutIn(long timeout, TimeUnit timeUnit,
			TaskMonitor monitor) {

		TaskMonitor delegate = Objects.requireNonNull(monitor);
		if (!delegate.isCancelEnabled()) {
			// could be a dummy monitor; create a monitor we can cancel
			delegate = new TaskMonitorAdapter(true);
		}

		TimeoutTaskMonitor timeoutMonitor = new TimeoutTaskMonitor(delegate, timeout, timeUnit);
		return timeoutMonitor;
	}
Creates a timeout task monitor that will be cancelled after the specified timeout.  The
created monitor wraps the given monitor, calling cancel on the given monitor when the
timeout is reached.  This method allows you to use an existing monitor while adding
the timeout feature.

@param timeout the timeout value
@param timeUnit the timeout time unit
@param monitor the monitor to wrap
@return the newly created monitor
Ghidra/Framework/Generic/src/main/java/ghidra/util/task/TimeoutTaskMonitor.java