Strange behavior with input and output port

larryd:
It takes 1.3us for loop() to close and loop() to open again.

I didn't realize there was that much involved in loop(), I was thinking it was a single goto instruction to get back to the beginning.