depends on dirtiness
Really, one hour, 10 hours, or 24 hours, will depend on your tank.
Goldfish or discus tanks, or certain messy cichlids, one hour may be a problem. My planted tank canister is always filthy, so the canister is probably nasty but when the power comes on to run the filter, the lights should be on also to let the plants take in the ammonia. The fish only tank is usually pretty clean and I don't worry about that one.
How long it takes for your canister to go foul will depend on what is inside the canister. If you have a lot of food stuck in there, it will sour fast. If it is relatively clean, it won't be so fast. Tank temp probably is important also. pH maybe.
So, if a big storm is coming, a hurricane or basic springtime winds, you may want to be better about keeping the canisters cleaned.
If you come home or wake up and find the power has been out, add a dose of Prime to the tank while you ponder whether you need to do anything else. You may want to clean the filter if is dirty, or it may look OK, just let the fish tell you. When the power comes back it will blow all that foul water into the tank, so think about that.
When Rita was coming this way, I cleaned all canisters the day before, did water changes, then in the AM after the storm hit, when power was out, I dosed the tanks with Prime. I disconnected all canisters and removed media to a plastic bag, sealed, and put that in the shade outside. I was expecting possibly a few days without power. When the power came back on, I rinsed each and replaced.