I can only speak to .mil aircraft that I've worked on (F-14s, F-18s, and H-2s). They usually have an onboard battery that works through an inverter buss that auto transfers (used to be relay contactors, now it's solid state) power in an instant to maintain control systems off the battery/inverter while the APU (if installed) power ups and takes over. Change over still comes with a power hiccup, but critical flight systems, even .mil fly-by-wire take a licking and keep on ticking, so to speak.
Ships.....no so much. Ships inherently float, therefore a loss of power doesn't instantly pose an existential threat to existence like such a failure would to a flying aircraft, so there's a lot more leeway in response times.