How long is breastmilk good for after pumping at room temperature??

Baby girl had a very hard time latching while in the hospital, she was two weeks early so I gave in pretty quickly and let her have formula however they recommend I pump when she ate as well to help build my supply and I can bottle feed it to her. So I have been doing that on and off. Honestly been hard to remember since I’m just worried about her eating in general. Tonight my boobs started leaking bad so I pumped and I pumped almost a whole ounce!! But baby girl just went to sleep and probably won’t want fed again for maybe 3 or 4 hours. Will it still be good by then at room temperature or should I fridge it? Freeze it and save it and just fed her the next time I pump at a better time???!