the majority of the times it is what 2 Frazzled stated. Low voltage causes high amperage which causes the compressors internal breaker to trip. It sounds like if you ever unplugged your refrigerator and plugged it right back in. You will hear a hum and click a few times before it restarts. If you have access to a digital vote meter plug it into one of your outlets. If the voltage drops down into the 90's when the air conditioner tries to start you have a voltage problem.
But your clue that it will run for only an hour. The symptom usually is a dirty condenser. Even though you have a fairly new PC the variables are how much you have used the air conditioner and where is was used. Some places here in the north east we get a lot of fuzzy stuff floating in the air from poplar trees and dandelions. This is drawn into the condenser coil and forms a mat like material over the fins. It plugs of the air flow and the unit over heats. It will trip the thermal overload. And will reset after the unit cools down.
If this is the cause you can fix it by removing the cover and brush off the debris and then wash the coil down with a garden hose.
WARNING when removing cover shroud, beware of bees.