You can search the internet for a phase detector circuit. A simple way to do it is to square up your two signals using comparators, then feed the output of the comparators to an XOR gate. Low pass filter the output and you'll get an average DC value which represents the difference in phase of the signals.