Ten seconds before the shaking started early Sunday morning, an experimental warning system in a UC Berkeley lab sounded an alarm, counting down to the impending earthquake. It was the biggest test yet for a promising earthquake alert system that remains stuck in budgetary limbo.

The warning works by outrunning earthquake

The system works by leapfrogging the earthquake. Sensors near fault lines detect the first sign of an earthquake — the faster moving but less destructive P-waves — calculate the severity of the quake, and broadcast a warning before the more destructive S-waves arrive. That means that areas near the fault in Napa wouldn’t have gotten any warning, but the Bay Area could have received several seconds notice. Depending on the region and the size of the quake, researchers at the United States Geologic Survey, which runs the program in collaboration with several universities, say it could give warnings up to a minute in advance.

It might not seem like much, but even a few seconds notice could allow utilities to shut off gas lines, elevators to let people off at the next floor, and trains to slow down. The USGS cites the benefits a warning could give to a doctor in the middle of performing surgery. In 2012, BART adopted an automatic braking system linked to the program, called Shake Alert.

Shake Alert is stuck in budgetary limbo

Japan is a pioneer in earthquake warning technology. When a magnitude 9 earthquake hit in 2011, the warning system halted trains and students took shelter under desks. Richard Allen, the director of the UC Berkeley Seismological Laboratory, which is working on Shake Alert, points to the example of Oki Electric Industry, a chip manufacturer that lost $15 million in damage from two earthquakes in 2003. After linking up its factories to an early warning system that automatically isolated dangerous chemicals and shut down robots, two similar quakes caused only $200,000 in damage.

Last fall, California Governor Jerry Brown signed a law to turn Shake Alert into a statewide program, but the project has received only $10 million of the $80 million it needs in new sensors and infrastructure. After this weekend’s earthquake, those funds may be easier to find.