can anyone explain millis() function precisely?
It returns the number of milliseconds (roughly) since the Arduino last reset.
It rolls over its 32 bit value after about 49 days. (232 1/1000ths of a second is 1 193 hours 2 minutes and 47.296 seconds)
What precisely do you want to know?
see - millis() - Arduino Reference -
It has a small cousin - http://arduino.cc/en/Reference/Micros -
and it is part of the most famous Arduino tutorial - http://arduino.cc/en/Tutorial/BlinkWithoutDelay -
Note the return value is an unsigned long, and one should take care when comparing millis() often you should use >= or <= to prevent missing "ticks" that can happen ewhen using == . Finally, allways use substractions like in the blinkWithoutDelay to be overflow proof.