Yes, correct.

I tried to make this code respond faster, by changing the pause value from 1000 to 100 (works fine), but when I change it from 100 to 10, now it improperly detects half of the statements.

I want to use this code to remote control a clock, and as I understand, PULSIN can't run in background, so it will be slowing down the clock routines, right? The clock code has to read from RTC, update display, check for alarms, adjust backlight leds and so on....

As I understand, there will be a need to use timer somehow, for lead pulse detection, and based on it, interrupt will be generated and IR decoding code will be run?