Otherwise the return value could be compared to the previous return value. But looking through the code, CapCounter isn't used anywhere else except here so it could simply be reset to 0 at the beginning of a capture event, or as the first line in ```PIOS_HCSR04_tim_edge_cb```.