Techniques to accurately measure the time it takes for a wave or an object to travel a given distance. Time of flight for reflected waves, such as light, can also be used to measure distances. Such techniques are being used in spectroscopy, flow meters, and collision avoidance in robotics.