Yes, if you've got one....... but people don't, or they forget to check the batteries, or like my MIL have it sitting in the packet for 6 mths until they get around to putting it up. It's the plus side of council housing that we've got a mains operated fire alarm.
It doesn't take long though. Me and DH were staying round BFs flat a few years back (very much pre kids) and we were woken by her fire alarm. It's very disorientating, for a good while we thought it was a car alarm outside. It was only when we woke up fully (and BF came running out of her room saying Oh F**k it's a fre!) that we noticed the thick black smoke and flickering orange light. We were lucky the fire wasn't that big, an extension lead in the back room had caught fire. Her DP beat it out with a large teddy bear called George and then went back to bed whilst we sat around drinking brandy and freaked out But even that short exposure meant we were coughing up black stuff for a few weeks, and me and BF were constantly on our inhalers. It really doesn't take long.