Measuring the frequency of light with mode-locked lasers