1. Woodpeckers have special eyelids that close a millisecond before each hit.

(What is the part of speech of 'a millisecond' in the sentence?)

2. His eyelids closed just before the soccer ball hit his head.

3. His eyelids closed one minute before the soccer ball hit his head.

4. His eyelids closed two seconds before the soccer ball hit his head.

(Are the sentences all grammatical?)

"millisecond" is a noun.

All are grammatically correct, but I don't think #3 is likely unless he had fallen asleep. =)