Usually you're looking at 24-48 hours but if you only ate a bit it might be less.. Drink up and try to get some sort of electrolyte drink into you. Also white rice can help to bind things together. Fruit makes it worse.
If your income depends on it then you could try immodium but it's not good because your body needs to get the toxins out as fast as it can and immodium interferes with that.