01the duration of activity leading up to a past point, including evidence of recent activity
Use had been + -ing to express the duration of activity leading up to a past point, including evidence of recent activity.
They had been searching for survivors for six hours when the helicopter arrived.

