As a tool you generally break out in the event of an emergency situation, a generator is expected to have a certain degree of reliability. Otherwise, what would be the point of something that's ...
Since the majority of power outages last no longer than 5 sec, a UPS with a 10-min or 15-min battery can provide enough power to ride through the outage or give ample time for an orderly shutdown.