Lag Compensation time measurement mechanism

Options
How does Photon know the exact Lag Compensation timestamp of the recieved data, what is the mechanism behind it?