What sort of resolution do you need and what is the longest period (minimum rpm) you're expecting?

On rising edge of signal, start timer.
On falling edge of signal, read timer, this is the "on-time".
On next rising edge of signal, stop timer, this is the period time. While waiting here you need to keep track of the number of overflows that occurs and add up the total time.

/Henrik.