Here is a truly incredible video showing how Japan's ElarmS system worked:
"ElarmS, or Earthquake Alarm Systems, can provide warning of ground shaking during an earthquake. The objective is to rapidly detect the initiation of an earthquake, estimate the level of ground shaking to be expected, and issue a warning before significant ground shaking starts."