I hope the guy is not just crying wolf. IIRC, Japan gave a very short warning for a quake recently.
I was wrong. They apparently have a early warning system set up which has been in use for years. https://en.wikipedia.org/wiki/Earthquake_Early_Warning_%28Japan%29