California’s nascent early-warning system showed its value again Sunday when an earthquake struck the North Bay.

On a video released by scientists at UC Berkeley, a loud tone is followed by an announcement of imminent ground shaking. The warning was triggered 10 seconds in advance of the 6.0 magnitude quake that was felt from Santa Cruz to Lake Tahoe.

Sunday’s quake wasn’t the first demonstration of the early-alert system’s potential. In March, it provided three seconds warning before a 4.4 magnitude quake in the Los Angeles area.

Three seconds isn’t much warning, but in our heavily automated world, it could be adequate to stop light-rail trains and elevators, close valves on natural gas mains and open bay doors at fire stations so emergency vehicles aren’t delayed by power outages. Ten seconds could allow hospitals to notify surgeons or utilities to get word to any crews working near high-voltage power lines. Had Sunday’s quake struck during regular business hours, a few seconds warning may have been enough for winery workers and visitors to get clear of falling barrels.

With a complete network of seismic sensors around the state, scientists working on the Shake Alert system believe that it could deliver warnings as much as 45 seconds or a minute before a quake.

The system works by detecting P-waves, the first energy to radiate from an earthquake, which travel faster than the damaging S-waves that follow. Using that information, the location and magnitude of a quake can be estimated and a warning issued, except at the epicenter, where the P- and S-waves arrive simultaneously. A number of public agencies and private companies, including Bay Area Rapid Transit and Disneyland, already receive alerts. Eventually, the U.S. Geological Survey and partnering universities expect to offer alerts to the general public, perhaps using a cellphone app. Their goal is to establish an alert network covering Washington, Oregon and California.

“In just a few seconds you can do what we’ve been telling you to do all along, which is to drop, cover and hold,” Doug Givens, the USGS earthquake early warning coordinator told NPR. “Perhaps your cellphone app will say, ‘Yeah, we’re serious. This is a big one. Get under a table right now.’ ”

A law signed last year by Gov. Jerry Brown commits California to Shake Alert. But the state committed no funding to the early-warning system, which is expected to cost about $80 million to complete and $20 million a year to operate. So far, most of the funding for Shake has come from the Gordon Moore Foundation and the USGS.

Given its history of budget shortfalls, the state ought to be cautious about committing to new programs. But this is a seismically active region, and even a moderate quake has the potential for widespread destruction and loss of life as well as long-term implications for the state’s economy.

Japan and Mexico already have early warning systems, and California must find funding for its own.

No amount of warning will prevent all the physical damage caused by an earthquake. Yet we know that bigger quakes are coming, and even a few seconds could keep a broken gas line from sparking a fire such as the one that destroyed four mobile homes Sunday morning in Napa and give first responders a head start, potentially saving many lives. Isn’t that worth a relatively small investment of public money?