when getting_the delivery 是带连词的分词短语作时间状语的.=when he or she gets the delivery
再如:
Be careful when crossing the road.