I had food poisioning a mnth ago. It was horrible! I had listeria from a premade salad. I think you would know if it was food poisoning. I was throwing up any and everything along with diarrah and it was so bad even before the 16 hour mark I was so badly dehydrated and in pain I was rushed to the hospital. They said it wouldn't hurt the baby, but the dehydration was causing me to contract and they had to stop preterm labor and give me iv antibiotics and fluids. The dehydration was the dangerous part. I had a fever as well during that time. Just becareful and especially watch for dehydration at anytime food poisioning or virus.
As the others said, it can be hard to tell. Food poisoning can be caused from different things, and has different lengths of time it can last. A bacterial form can take anywhere from one hour to 4 days to show up, and last just as long. A viral form can take 12-48 hours to appear.
A stomach virus symptoms will usually appear 1-2 days after exposure, and lasts usually 2-5 days, and sometimes shorter. My house got one a month ago that lasted no more than 18 hours at the longest, and 4 hours at the shortest. These are extremely contagious and typically an entire household will be affected.
If the bug in question is a stomach virus...you may not be able to tell.
Stomach viruses can cause nausea, vomiting, stomach cramps, diarrhea, and fever. Unfortunately, so can food poisoning. Food poisoning generally lasts a shorter amount of time then a virus. If it lasts for a day or less, it's probably food poisoning.
Food poisoning sets in 12-24 hours after consumption of the contaminated product.
Food poisoning tends to e short lived. A bug would probably be accompanied by sore throat or other symptoms