そうこうしているうちに
Meanings
1
meanwhile; in the meantime; while doing this and that
usually written using kana alone
Used when something happens while one is occupied with various things or during the passage of time. Often implies that time passed without noticing.
See also: そうこう
While I was doing this and that, it was already time for the train.
Before I knew it, the sun had set.