expression, adverb
Used when something happens while you are busy doing this and that; often implies a passage of time during miscellaneous activities.
See also: 然う斯う (そうこう) · そうこうしている内に (そうこうしているうちに)
そうこうするうちに、すっかり日が暮れてしまった。
In the meantime, it got completely dark.
そうこうするうちに、電車の時間が来てしまった。
While I was doing this and that, the train time arrived.