Determine which clock has arrived first
Latch clock A on the rising edge of clock B. If the result is high then A arrived first.

Of course this is assuming you have zero setup and hold times on the data inputs of your latches or that you know the phase shift is always going to be of a certain magnitude. In the real world with small phase shifts it gets a lot harder to be sure.