单项选择题

Only when we had finished all the work ______ that it was too late to take a bus home.

A.did we realize
B.will we realize
C.we did realize
D.we will realize