Monitoring a reed switch - odd delay?

Edited my original post. Sorry! I thought it was helpful to do it via Github because my .ino file references two additional files.