Iets als dit regelt de NTP update in de aquacontrol software:
// wait a specific interval, accounting for rollover with subtraction! unsigned long timerInterval = 50; // this is the interval in milliseconds unsigned long nextTimer = millis() + timerInterval; void loop() { lastMillis = millis(); if ( ( long ) ( millis() - nextTimer ) >= 0 ) { Serial.println( "Interval has passed." ); nextTimer += timerInterval; //do some more stuff... } //rest of the main loop }
Alles nur geklaut:
http://playground.arduino.cc/Code/TimingRollover