Since delay(n) waits for n ticks of the millisecond counter, any time already elapsed in the "current" millisecond isn't taken into account. This was fixed a long time ago for the AVR, but it didn't make it into SAMD/SAM https://github.com/arduino/Arduino/issues/237 https://github.com/arduino/ArduinoCore-avr/commit/67c0a1995aace2953e481ef6183b1b91e04942fc#diff-ab397febf179e1982f4ee0758df4c982