We seem to get quite a few power cuts even though we are on mains electricity. Sometimes the power just cuts off for a second or so and sometimes, like this morning, it goes off for longer.
I don't suppose the power cuts do any of the devices that are permanently switched on any good but particularly at risk are computers. If the power happens to go off when the computer is switched on then you get what Windows describes as an illegal shutdown.
As a minimum, any documents you are working on get lost but it could be worse. Windows itself could be corrupted or even a hard drive could crash. You could end up with a dead computer.
The answer to the problem is an uninterruptible power supply or UPS. UPS have a lead acid battery that is designed to take over and run your computer and monitor when the AC supply cuts out. The switch from AC to battery is instantaneous so the computer and monitor stay running until the AC current comes back on or until the battery runs down.
The most sophisticated models connect to a program which switches the computer off safely before the battery dies. With mine though I have to switch the computer off manually. The UPS does warn me though when the battery is low so that I can shut down before it dies.
So how much do they cost? Well mine was 39€ and provides ample power for both the computer and monitor. For 69€ I could have got a model that would shut down the computer automatically. The battery in mine is good for four years or so at which time I can either replace it or buy a new UPS.
I nearly forgot; an UPS also filters noise and provides a constant voltage to the computer so even when there isn't a power cut the computer is protected from surges and spikes.