The fire alarm went off during one of my final exams at university.
Immediately the invigilator shouted "stay seated, we wait for confirmation", but within a few seconds a security guard ran into the room and shouted "please leave immediately".
There was a fire, but I assume this process was in place to take account of people trying to disrupt the examination. I don't know how long the invigilator would have waited for security.
The invigilators tried to find everyone outside and keep us together without discussion, but that was unrealistic in Central London, there is too little open space.
Fire fighters extinguished the fire within about half an hour, and we finished the exam.