If you want to protect your PC in case of a blackout, what you need is a UPS (Uninterruptible Power Supply) with battery backup. This way, when there is blackout, your computer will draw power from the battery however, how long the battery last depends on how much power your computer is taking from the battery. Of course, the more high end PCs are taking a lot of power hence the battery typically only last to safely shut down your computer while on a lower end computer, the battery will last longer.