Describes the time when a certain action takes place; 'when', 'at the time'.
Long explanation:
The ~るときに grammar point is used to indicate the time when a certain action or event happens. It can be translated as 'when' or 'at the time' in English. The formation involves attaching ときに to the verb in its dictionary (る) form.