cattledog:
How do you know when to start and stop counting? How will you communicate that to the library functions?
DrDietterich is correct. Using the "photo eye" (an IR photoelectric sensor), I know at what "encoder pulse" to start counting and when to stop counting; then multiply the number of "pulses" to get the length.
I apologize for leading you down this path, but I didn't know where we were going to end up. What I was [originally] wanting was the most effective way to utilize the encoder with a Photo-eye. I felt there might be a better method than just a "digitalRead" on BOTH the encoder and the "photo eye" every time the sketch looped. Using the timer to count "pulses" from the encoder caught my attention as a possible "alternative."