Very interesting.
I made several tests with this easy code:
unsigned long duration;
int counter = 0;
unsigned long before = 0;
void setup()
{
pinMode (5, INPUT);
Serial.begin(9600);
}
void loop()
{
duration = pulseIn(5, LOW, 10000000L); // yes 10.000.000
{
Serial.print("D: ");
Serial.println (duration);
Serial.print("M: ");
Serial.println(millis()-before);
before = millis();
}
}
not working. I got:
core.a(wiring_pulse.c.o): In function `pulseIn':
/usr/share/arduino/hardware/arduino/cores/arduino/wiring_pulse.c:68: undefined reference to `__muluhisi3'
collect2: error: ld returned 1 exit status
File /usr/share/arduino/hardware/arduino/cores/arduino/wiring_pulse.c line 68 (original) :
return clockCyclesToMicroseconds(width * 21 + 16);
If I change it to:
return clockCyclesToMicroseconds(width * 2 + 16);
(I know that there no sense)

...there no any compilation errors.
As you can see I just changed "21" to "2"

BTW, code with "3" :
return clockCyclesToMicroseconds(width * 3 + 16);
not working too.

any ideas?

PS: Maximum value for "width" i have <= 736.
PPS: Gentoo Linux 64bit