单项选择题

After I ______ for half an hour, I realized that he was not coming.

A.have waited

B.waited
C.had been waiting

D.was waiting