while; on the occasion of; at the same time as
Attaches to the continuative form (連用形) of verbs or to nouns, indicating that one does something while taking the opportunity to do another thing. Often used for combining a main purpose with a secondary activity.
I dropped by the nearby convenience store while taking a walk.
While out shopping, I stopped by my friend's house.
while out on a walk; while strolling
Derived from the classical Japanese suffix がてら, which expressed doing one thing while doing another. The exact historical derivation is uncertain, but it has been used since the Heian period.