public CompareResult compareSchedule(TraceSchedule that) {
		CompareResult result;

		result = CompareResult.unrelated(Long.compare(this.snap, that.snap));
		if (result != CompareResult.EQUALS) {
			return result;
		}

		result = this.steps.compareSeq(that.steps);

		return switch (result) {
			case UNREL_LT, UNREL_GT -> result;
			case REL_LT -> (this.pSteps.isNop() || this.source == Source.RECORD)
					? CompareResult.REL_LT
					: CompareResult.UNREL_LT;
			case REL_GT -> (that.pSteps.isNop() || that.source == Source.RECORD)
					? CompareResult.REL_GT
					: CompareResult.UNREL_GT;
			default -> this.pSteps.compareSeq(that.pSteps);
		};
	}
Richly compare two schedules

<p>
Schedules starting at different snapshots are never related, because there is no
emulator/simulator stepping action which advances to the next snapshot. Though p-code steps
may comprise a partial step, we do not consider a partial step to be a prefix of a full step,
since we cannot know <em>a priori</em> how many p-code steps comprise a full instruction
step. Consider, e.g., the user may specify 100 p-code steps, which could effect 20
instruction steps.

@param that the object of comparison (this being the subject)
@return a result describing the relationship from subject to object
Ghidra/Debug/Framework-TraceModeling/src/main/java/ghidra/trace/model/time/schedule/TraceSchedule.java