You determine it by assessing the situation as it unfolds. Here is a link to an article that gives a perfect example of assessment working well:
I cannot say what you would or would not do if someone pulled out what you thought was a gun and pointed it at you but I am pretty sure I would look at it - after all that is just what I did in the past. Why, I guess because it is a pretty natural reaction to look at the threat and because I was trained to assess the situation. Short story, 2 guys pull up to a parking space in a car in front of me as I am walking by. I walk past car, door opens, guy gets out with sweater in hand, as he is beginning to stand he says don't move MFer and pulls sweater back revealing something that looked an awful lot like a white metal short barreled rifle barrel. He was pointing it at me. I kept moving, drew and shot him. A second shot hit the windshield of the car they were in. Driver had appeared to be exiting car with a revolver in his hands. He fled, other guy still in car fled.
The thing is I saw what looked to me to be a threaded barrel of about .30 caliber pointing at me. I began to draw and suddenly saw that it looked like the guy was pointing a clear plastic soda bottle at me. A brief momentary surge of relief due to wishful thinking? Maybe, but I heard myself screaming at myself inside my own head "it's a gun, shoot him he has a gun" and the thing again looked like a gun as described above. As I said, I shot him. Was it a gun. NOPE. It was not a bottle either. When police responded, one of the detectives found a length of pipe laying in the street. It was white metal, had a threaded end and had what sure looked like a .30 bore through it. It looked like a gun when held the way the bad guy had held it. It would have fooled anyone, I think and so did the police think likewise. What about the driver, did he fool me too? NOPE. He had a revolver in his hand alright.
How did police figure this out. Well, while I was at police station giving a statement, a 911 call comes in. Another guy has been robbed by the same pair of hoodlums. Police figure my shot must have missed but are wrong. You see, even though 911 call comes in after my shooting event, the call was about a robbery that took place about 20 minutes before I was robbed. Took the victim about 40 minutes or so to walk home and then call police. As for how police knew the other guy had a revolver, well the other victim's story told them that. He said he was robbed by guy with shotgun hidden under a coat and another guy who stuck a loaded 38 in his face. How did he know it was loaded - he saw the bullets in the cylinder and this was at night under a street light at best. Two people robbed, two people looked at the weapons. That is part of a natural reaction and is also part of good firearms/self defense training.
But, why would assessing be important in the situation of the particular robbery reported on in the above linked article? Imagine the guy, who was asking for the ammo, was legitimate. He thinks he has $60 and puts it on the counter. The clerk tells him he is short by over $10. The guy realizes, "oh man, I gave Fred the other $20 so he could pay the toll on the way to the gun store. He still has the change". At that point, the guy pulls out a black cell phone, like a Nextel with short antenna. He hits push to talk, his hand out in front of him with antenna pointing at clerk. Guy says to Fred over the phone - "give me all your money". Would you have shot him? If not, why not? Would it have been because you looked at the phone and realized it was a phone? Same thing with the clerk looking at the gun, he assessed.
The clerk looked at the gun. It is natural and also should have been part of any good training course because you want to be sure before you shoot. It almost certainly did take less than 30 seconds as someone in a forum in which this incident was discussed had surmised. Heck, it probably took less than 3 seconds, from the moment the bad guy drew his weapon until he fled. The initial assessment probably took a second or less. Seeing the empty cylinders took place in that shorter time frame, though the assessment was ongoing and excellent. Why was it excellent? Because the clerk decided to fight the threat, he drew and that was his decision to make. It does not say he noticed the gun was empty then drew, it says he drew as he was zeroing in on the other guys gun. In other words, he heard the verbal demand for money, he also saw the gun, he started to draw but also was assessing all along and saw the other gun was empty. (I have to wonder if he was moving too, and moving for cover, movement and cover are your friends if a guy points a gun at you.) Then the guy ran, and the clerk decided not to shoot. How long do you think it took for he clerk to start to draw and for the other guy to assess his own situation, see the clerk's gun and run? Probably a second or less from the start of the clerk's draw.
The clerk did the right thing by not shooting. Had the crook assessed the situation when he was in the store earlier in the day, or even when he was shoving $40 onto the counter, maybe he would never have attempted the robbery or maybe, when he walked in the second time, he would have walked in shooting. Thank goodness many of them are dumb.
All the best,