That's not how your digestive system works. You have three major parts: stomach, small intestine, and large intestine. Food spends 6 to 8 hours in each section. The stomach breaks food down. The small intestine absorbs nutrients. The large intestine absorbs water. Now this is the oversimplified version, there are other actions going on like bile being added, etc. Diarrhea is when the large intestine doesn't absorb all of the water. By that point, nutrients have already been absorbed, including any oral medications.
Diarrhea is not from what you just ate, less than an hour before. It's most likely from what was eaten there day before. So if you're eating spicy food nearly every day, like I often do, it might appear to be that it's that quick.
All this is assuming you aren't doing something outside the norm. Any kind of gastric bypass or bariatric surgery would change that. Other outside factors such as food poisoning or weight loss medications may also influence the time frame.
BTW, I went to school in the medical field.
Sent from my SM-G930V using Tapatalk