For earthquakes, there is a lapsed time between the arrival of the p-wave and the s-wave, because the waves travel at different speeds. The length of this period of time determine the distance to the epicenter.
Earthquakes create seismic waves. P waves are faster than S waves. As the P and S waves move out from an earthquake, the P waves get ahead of the S waves. The distance of a seismic station from an earthquake can be determined from the time difference between the time of arrival of the first P wave and the first S wave.