Always use code tags when posting code, so that it looks like this:
//sensor1Value = analogRead(A1);
which line, incidentally, is a comment (due to the "//" at the beginning) and therefore does not read sensor1Value.
Photoresistors are too slow to detect anything much faster than walking pace movements. You need to use a photodiode or phototransistor to time rapid motion.
Finally, ALWAYS use unsigned long declarations for millis() or micros() related variables. This won't work in general:
double startTime;
double endTime;