Advance earthquake warning is possible by detecting the nondestructive primary waves that travel more quickly through the Earth's crust than do the destructive secondary and Rayleigh waves.
The amount of warning depends on the delay between the arrival of the P wave and other destructive waves, generally on the order of seconds up to about 60 to 90 seconds for deep, distant, large quakes such as the 2011 Tohoku earthquake. The effectiveness of a warning depends on accurate detection of the P waves and rejection of ground vibrations caused by local activity (such as trucks or construction). Earthquake early warning systems can be automated to allow for immediate safety actions, such as issuing alerts, stopping elevators at the nearest floors, and switching off utilities.