Which word in the sentence does the adverb clause modify?

Take the cookies out of the oven when the timer rings.

A.
Take

B.
when

C.
oven

D.
cookies