Wait for a pulse to arrive, and once it does start running a loop of fixed length. Count how many times you ran trough the loop until a second pulse arrives.
Now multiply the loop's length * the amount of times you've gone trough it and you know the length...
This, of course, only works if the pic doesn't need to do anything else at the same time...
If you wanna use timer, you have to get in in interrupts changes. You may use interrupt in portB, pin RB0 or use Capture. Each time, you get the interrupts, you send out the value of timer and reset the timer.
Of course, you have to take in account that how many instructions you lost to take the timer value, and substract it in your code to get realtime result.
program for 2MHz to interrupts?? What does it mean? Is that you need to timing about 2MHz pulses.
With 2MHz pulses, you cannot use anything to measure the duty cycle, because 5MHz is the max pulse generate from normal 20MHz crystal. You only can wait by counting and checking the port. Because it needs some instruction to go to ISR and get out from it, you will lose your pulses.
However, you may try with capture and external timer1 clock??? Did you try it?
You can't possibly generate interrupts at 2Mhz. If your signal is comming in that fast then forget using a pic, it's way to fast you wouldn't be able to do anything with the results.