chipKIT® Development Platform

Inspired by Arduino™

Last edit: 2021-03-21 22:34 by Majenko

Micros

  1. Synopsis

  2. Description

  3. Return Value

  4. Caveats

  5. Conforming To

  6. Examples

  7. See Also

Synopsis

 unsigned long micros()

Description

micros() returns the number of microseconds that have elapsed since the board was powered up.

Return Value

The number of microseconds that have elapsed since powerup.

Caveats

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

Conforming To

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

Examples

 uint32_t us = micros();

See Also

delay(), delayMicroseconds(), millis()