Sounds awful. My stomach discomfort lasted around 5 hours, I slept through some of it and watched some TV to try to distract myself the rest of the time. Didn't eat anything else of substance the rest of the night. I think I had a granola bar around midnight. I definitely would have struggled if I had to work while feeling like that but I'm working from home so... I probably could get away with a slacker day on the clock. Fortunately it didn't come to that.
Long story alert: don't waste time reading if you don't want to.
You mentioning your boss telling you to go home brought back a memory of an instance where the exact opposite happened for me. I worked for a fast food chain in my late high school years. One summer weekend I had gone with some friends to Noah's Ark. I had forgotten to bring sunblock and for whatever reason I didn't buy any or borrow any, hard to recall if anyone else even had some. Suffice to say, by the end of the day I had a pretty nasty sunburn. Man I was dumb, I could feel my skin was hot as the day was winding down but it's never as bad in the moment as it's going to be as more time passes. My shoulders and upper arms ended up covered in blisters. Not good times.
Next day I was supposed to work, called them up and begged to have the day off because I was feeling terrible. The assistant manager answered, he was a guy I didn't have much of a rapport with, I was pretty well liked by management otherwise, especially the manager but this assistant manager was newer and for whatever reason he didn't know me well enough or didn't care or maybe he was even jealous that the manager liked me, I don't know, but he decided to be a big tool and express doubt that I was telling the truth or felt like I was exaggerating just to get out of work without finding a replacement. To be fair a lot of high school kids are super flaky with jobs like this and as I said he didn't know me real well. So he tells me if I don't come in I'd be fired. Or at least he implied it convincingly enough for me to believe him so I sucked it up and reported for my shift, half believing that when he saw me he'd realize I wasn't trying to pull a fast one and send me home. Nope, everyone but him, he was one of those guys that would never admit when they're wrong.
I was red like a lobster. Everybody could see it. People were asking me why I was there and I was like, dude told me I better show up or else. The guy didn't make a lot of eye contact with me and I worked for most of my scheduled shift, 5 or 6 hours. Oh, I worked in the back with the grills and fryers and there was no air conditioning so it was like 100 degrees back there (yay 80s!). It really sucked. After the lunch rush the guy comes up to me and says, take out all the garbage and then I guess you can go home.
I thought, "Geez Louise, thanks for being such a swell guy." Anybody could have taken the garbage out and it would have taken 15 minutes but I could barely raise my arms above my head and I'm supposed to throw all the bags of garbage into the trash compactor behind the restaurant which was above shoulder level. It took me about a half hour so I think I got to go home a whole 30 minutes before my shift ended anyway. So kind and thoughtful. He didn't stick around too long, I wasn't sorry to see him go.