That code seems awfully complicated for measuring the time between two events that are that far apart in time.
Polling the pin would be plenty fast enough - no interrupts, no diddling with timers.
That code seems awfully complicated for measuring the time between two events that are that far apart in time.
Polling the pin would be plenty fast enough - no interrupts, no diddling with timers.