Although I realize this thread is several weeks old and the issue is likely resolved, I want to add a two important tidbits about using the Arduino millis()
The millis() is incremented once per rollover/overflow of the system timer (Timer0 on AVR commonly). This usually occurs once per 1024 microseconds or 1.024 milliseconds (on AVR). The 0.024 extra ms are accumulated until there is another >=1 ms to add to the millis counter. This means that in one second, the counter only increments 976 (or 977) times, skipping a count approxmately each 42 counts. If you want to do something every say 100 ms, it isn't a big deal. If you want to do something 1000 times (or 500 times etc.) per second, it is a very big deal. If you need accurate short time intervals, use micros() instead. If you need a counter that is approximately 1 ms but never skips a count, you can use the timer 0 overflow counter (look inside the millis() function itself). Beware that it is incremented inside an ISR so make sure to use some form of atomic access (probably disabling and enabling interrupts).
Some have made note of the overflow issue. This can be an issue, but only if you do the comparison in the wrong way. For example, if you directly compare the millis() count to an expected number [e.g. if (millis() > nextCount) ] then overflow will bite you. However, if you cast millis() return value to an unsigned number and subtract the previous timestamp, then compare to some interval, you will not have this issue. For example, if the previous timestamp was 5 less than the maximum (0xFFFFFFFA or 4294967290) and twelve "millis" have elapsed, then millis() returns 6 (0x00000006). Using unsigned 32b numbers, performing (6 - 4294967290) will still give 12, the correct count. This value can then be compared to the desired interval to determine whether to perform some action. Note that if you know for certain that you will check the interval regularly, you can save a few processing cycles and RAM on 8 or 16 bit micros, by using 16b signed numbers to store the present and previous millis() counts. Then that 16 bit representation of millis() will overflow once each ~ 65.5 seconds. If you do this, test your code well; different compilers (and optimization settings) can do unexpected things when casting and performing arithmetic on differently-sized numbers (32b/16b/8b).