The solution for exercise 16.2 in chapter Unit 16 - Past perfect continuous of English Grammar in Use by Raymond Murphy
Question
Read the situations and complete the sentences.
This time make your own sentence.
Answer
We had been playing for half an hour when it started to rain
I'd been waiting for 20 minutes when I realised that I was in the wrong restaurant. / I'd been waiting for 20 minutes when I realised that I had come to the wrong restaurant.
At the time the factory closed down, Sarah had been working there for five years.
The orchestra had been playing for about ten minutes when a man in the audience started shouting.
I'd been walking along the road for about ten minutes when a car suddenly stopped just behind me.