this code doesn't do what I expected :
unsigned long lastMillis;
void loop(){
do {
getTime();
Serial.println(time);
lastMillis = millis();
}while(millis() - lastMillis >= 1000UL);
}
I expected that runs once and then before runs every second, that may be each 15 minutes, the condition allways is true because I get the time more than once in one second:
2.9.14. T 22:11:37
2.9.14. T 22:11:37
2.9.14. T 22:11:37
2.9.14. T 22:11:37
2.9.14. T 22:11:37
2.9.14. T 22:11:37
2.9.14. T 22:11:37
2.9.14. T 22:11:37
2.9.14. T 22:11:37
2.9.14. T 22:11:37
2.9.14. T 22:11:37
2.9.14. T 22:11:37
2.9.14. T 22:11:37
2.9.14. T 22:11:37
2.9.14. T 22:11:37
2.9.14. T 22:11:37
2.9.14. T 22:11:37
2.9.14. T 22:11:37
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
2.9.14. T 22:11:38
what is wrong?