Millis

Name
millis

Description
This function returns the time elapsed since the begining of the program (or the last timer overflow or reset).

When the program starts an internal timer counter is initialized to 0. The timer counter is a 32 bit integer variable that is incremented each millisecond. The timer counter overflows everytime it reaches 4,294,968,295 (2^32 - 1) which will happen approximately once every 49 days. The millis function returns the current value of the timer counter.
 * Since: Beta 5

Syntax
u32 millis(void)
 * Parameters:
 * [None]


 * Returns/Output:
 * Returns the time elapsed in milliseconds since the user program was started.

_millis = 0;
 * Control: To reset the timer counter:

Bugs & Limitations
Up till X.3 r412 (14 May 2012), the timer for P8 used a variable of data type long, a 32 bit signed data type, so approximately 25 days after the program start, the timer counter would overflow to a large negative number. From X.3 r412 the P8 data type was changed to u32, the same as for P32.