PulseIn don't work well

Hey guys,
Alejandro, thx for the code and explanation, i'm integrating it in a school project, just one question, can your code be addapted for pulses from HALL sensors?, and measure the time between pulses?