help with timers and limit switches

How fast are you trying to measure? If you are trying to measure microseconds that may be difficult or impossible, at least with standard libraries and functions. If you are measuring hundreds of milliseconds or more it should be pretty easy.

The simplest method is to read the function millis() when the first switch is triggered and then read it again when the second switch is triggered. The difference will be the number of milliseconds between the two events.

Another option is using photo-interrupters. The time delay of the switches will be more consistent.