Answered: Optical shaft encoder

Lets say i wanted to find the RPM of a shaft spinning to figure when to tell a servo to shift gears in a transmission. I know it tells distance but can it combine rotations and time?
I wanted to clarify before i bought one.