Japan has poured some $500 million into a sophisticated network capable of detecting the first vibrations of an earthquake, called "P waves." These initial pulses do not create a lot of shaking and travel much faster than the killer shock waves that follow.
Millions into this 'early' warning (with false alarms). I sure as heck couldn't get out to turn off the gas in 10 seconds! And yet they have ridiculously poor earthquake preparation outside of Tokyo. I always have found their efforts to be totally Tokyo highrise oriented. They also have huge areas of soft landfill, and their share of cheap condos. Politics is everything here.
California wants to do this now. It's a very glamorous thing.