Today I measured a time from the end of a pulse to the end of the PulsIn command of about 12us.
For me the PulsIn command is useless.
In assembler it's the best way, but I don't know how to do this in assembler.