measuring the time between two events in Arduino

Hi guys! Is it possible to measure the time between two events in Arduino? As in like, if I have two photosensors, and when the value of the first one becomes a specific value, start measuring time, and stop measuring the time and report it to me when the second photosensor has a specific value.

Yes. Save the value of millis() or micros() when the first event happens. Save the value again (to another variable) when the second event happens. Subtract the first value from the second value.