Millis

From chipKIT
Jump to: navigation, search

Synopsis

 unsigned long millis()

Description

millis() returns the number of milliseconds that have elapsed since the board was powered up.

Return Value

The number of milliseconds that have elapsed since powerup.

Caveats

The maximum value of a 32-bit integer is 4294967295 and consequently this is the maximum number of milliseconds that can be counted. After this the counter resets to 0 and the counting starts again. This period is approximately 49.7 days.

Conforming To

millis() conforms to the Arduino 1.6.x API.

Examples

 uint32_t ms = millis();

See Also

delay(), delayMicroseconds(), micros()