1/*Description
2Returns the number of milliseconds passed since the Arduino board began running
3the current program. This number will overflow (go back to zero), after
4approximately 50 days.
5
6Syntax
7*/
8time = millis();
1/*Description
2Returns the number of milliseconds passed since the Arduino board began running the current program. This number will overflow (go back to zero), after approximately 50 days.
3
4Syntax */
5time = millis()
6
7/*
8Returns
9Number of milliseconds passed since the program started.
10Return Data type: unsigned long.
11*/
1unsigned long myTime;
2
3void setup() {
4 Serial.begin(9600);
5}
6void loop() {
7 Serial.print("Time: ");
8 myTime = millis();
9
10 Serial.println(myTime); // prints time since program started
11 delay(1000); // wait a second so as not to send massive amounts of data
12}