Time needed for a UPS to switch from line power to battery?
Depends on the type of UPS. From Electropaedia:
Off Line or Standby UPS
These are simple inexpensive systems providing only basic protection. In normal situations the UPS passes the mains power directly to the load. The mains power provides a single DC line which keeps the battery charged. When the UPS detects a voltage too low, it turns on the inverter to power the load from the battery. The system is relatively slow (longer than 4 ms) and the delay between mains power loss and inverter startup can be long enough to disrupt the operation of some sensitive loads. This technology does not normally provide full time power conditioning but it may use a simple filter to clip spikes and electrical noise.
On Line or No Break UPS
These are designed to provide a zero transfer time, with better voltage and frequency regulation than that can be achieved by off line and line interactive UPS. In on line systems the mains power is used to provide two DC power lines which feed both the charger and the inverter which is permanently turned on providing the AC power to the application. When the mains fails, the inverter instantaneously draws its DC supply from the battery instead of the mains.
The method by which the AC load is permanently supplied by the system inverter and not the mains is called "double conversion" since the charger provides the AC-DC conversion and the inverter converts the DC back to AC again.
On line systems typically provide full power conditioning, protecting the load from all forms of power disturbances, including brownouts, blackout, transient surges or sags. In the event of a mains power failure, there is no delay or transfer time to backup power. These systems are however more costly and have both higher power consumption, and higher heat generation.
Line Interactive UPS
These systems contain an off-line inverter but also use a transformer to supply to the load. In the event of a mains failure the inverter is started and switched to the transformer to provide the output. The transformer is used to provide line conditioning however it also maintains output on its secondary briefly when a total outage occurs increasing the hold up time of the UPS. This results in a break in the output of a few milliseconds or less and is thus faster than a simple off line UPS.
In my office, we have several of the ES style APC UPS's. Our building has a diesel-powered generator that comes on within 1-2 seconds after a power loss, and we use these UPS's to cover the period between power loss and the generator turning on. I've gone through their documentation for these models and I can't figure out what type they are. I also use these same UPS's at home and my computers have stayed on during a power loss.