Arduino millis() rollover: compare durations, never timestampsprocedure · unverified · millis() wraps to zero after about 50 days. Code that subtracts timestamps as unsigned long (now - start >= interval) keeps working across the wrap; code that compares timestamps directly (now >= start + interval) breaks.