Phase Sequence Detection of 3 Phase Supply

How does your Arduino know the phase relationship?