Digital Technique for Rapid Measurement of Time Lags