What kind of clause would (when painters looked at rapidly moving horses.) would it be a adverb,adjective, or noun?

The word "when" indicates time. Which type of clause tells when, where, or how?