A couple of libraries to emulate Arduino::pulseIn functionality without pausing code execution, using hardware interrupts.