Trouble with attachinterrupts

mrandersen:

I think you have to make those two variables 'volatile' as I added to your code above. Give it a try and report back.
http://arduino.cc/en/Reference/Volatile

Lefty

I tried this but both variables are still printing as the same number.

Well maybe the interrupts are coming faster then you think. Try using micros():

timeStarted = micros();

timeEnded = micros();

Lefty