I'm not an expert of my language, so please wait for the correct answer. I think it's an expression. This うちに means like "in / within" in English. (I think there's a difference between "within" and "during / between" in English and you use one of them dependimg on the expression, though I'm not sure...) I hope this was helpful to understand it a bit.