内に

while … is still the case; before … happens

→ 内
phrase Uncommon #17,991
while … is still the case; before … happens Follows a phrase describing a continuing state or a change that has not yet happened.
JA: あまり長く待たない内に彼が来た。
EN: He arrived before we had to wait long.

あまり遠くに行かない内ににわか雨にあった。

Before I got very far, I was caught in a sudden shower.

彼は両親の知らない内に家出をした。

He ran away from home without his parents knowing.

でもその内にわかるでしょう

But you'll understand eventually.

— 崖の上のポニョ (2008)

今夜はどうせ私達お泊まりだから帰れる内に帰った方がいいわよ

Since we're staying over tonight anyway, you should head home while you still can.

— 崖の上のポニョ (2008)

あまり長く待たない内に彼がきた。

It wasn’t long before he arrived.