Fast mains outage detector
If you really wanted sub-half-cycle detection, I guess a dual-supply comparator zero cross circuit where if the voltage is within some +/-V limits close to 0V starts a timeout timer. If the voltage exceeds these limits leaves the boundaries then the timer gets stopped and reset.

Pretty trivial to build if you connect an open-drain comparator with some diodes and resistors to an MCU pin with some code. You'll need a small bipolar voltage supply for the comparator. I also recommend adding an opto in the signal chain somewhere for isolation.

You'll need two of these: one for the upper bound and one for the lower bound near zero. You can feed to an AND gate to save an MCU pin or feed both comparator outputs to two MCU pins and handle the rest in software.







simulate this circuit &ndash; Schematic created using CircuitLab

NOTE: Beware isolation and safety issues, as well as common ground issues with AC mains and MCU circuit. I have not addressed these in the design.