Interrupt driven code will only give reliable accurate timing if all interfering interrupts are disabled. Otherwise you get mostly correct timing. That is every once in a while your timing will be off the mark depending on the interrupts that are blocking it.