Measurement of phase difference between two signals using cross correlation vs. fourier transform
Methods 1 and 2 are matematically equivalent, but I have experienced that method 2 is computationally more efficient for high sampling rates and large ranges of delay (notice that method 2 does not require a loop).