PiDuino Library

micros()

Returns the number of microseconds since the program start running. This number will overflow (go back to zero), after approximately 70 minutes.

Parameters

None

Returns

Number of microseconds since the program started (unsigned long)


Example

#include "Arduino.h"

void setup() {
}

void loop() {
	printf("Delay since start in millis %lu \n", millis());
	printf("Delay since start in micros %lu \n", micros());
	delayMicroseconds(1000000);	// Delay 1 second
	delay(1000);               	// Delay 1 second
}