I see 3 possibilities :
- it uses a timer witch overflows each millisecond , and fires an interrupt ;
in the ISR , the millis variable is incremented - it uses a timer witch overflows each millisecond , and fires an interrupt
in the ISR , a flag is set , anywhere in the RAM ; then in the loop , in a place reserved to the arduino system , if this flag is set , the millis variable is incremented , and the flag in RAM is reset (this method looks maybe stupid , but it's the way we , as users , are told to handle interrupts ... ) - it uses a timer witch overflows each millisecond ; no interrupt ; in the part of the loop reserved to the arduino system , there is a polling of the overflow flag of the timer ; if the overflow flag is set , the millis variable is incremented , and the overflow flag of the timer is reset
witch is the right one , who knows ?