As already said, it's almost impossible to put a precise figure on this as detection is almost certainly pheromone-related - so for a while there will be some residual pheromone circulating - but some bees can somehow detect a change almost at once (within a minute or two), whilst many - perhaps those used to lower levels of pheromone in areas of the hive further away from the brood area - will take a lot longer (an hour or two) to 'catch on' - but once the message starts to spread, then panic soon sets-in throughout the whole colony.
I can remember times when I've pulled a choice queen for marking (the only ones I ever mark), and after painting and then waiting for the paint to dry and harden - some 20-30 minutes - I've returned that queen to her colony with it not appearing to have noticed her absence. At other times, I've no sooner put the queen in a carry-cage, when colony distress has already started ...
LJ