Reading analog inputs for a breif period of time

You could use the principles underlying the blink without delay example.