Form
Subject + had + been + Verb-ing
The man had been walking the dog for an hour before it rained.
We had been eating dinner for an hour before they arrived.
Meaning
Duration Up To a Past Point
Used for an action that started before a point in the past and continued up to that past point. It emphasizes ‘how long’ the action had been happening before the past reference time.
PastPresentFuture
x
I had been studying for three hours when she called.
She had been living here since 2010 before she moved.