单项选择题

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