We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 89d3c92 commit 068107aCopy full SHA for 068107a
src/utility/time/RTCMillis.cpp
@@ -54,9 +54,8 @@ unsigned long RTCMillis::get()
54
{
55
unsigned long current_tick = millis();
56
unsigned long const elapsed_s = (current_tick - _last_rtc_update_tick) / 1000;
57
- if(elapsed_s) {
58
- set(_last_rtc_update_value + elapsed_s);
59
- }
+ _last_rtc_update_value += elapsed_s;
+ _last_rtc_update_tick += elapsed_s * 1000;
60
return _last_rtc_update_value;
61
}
62
0 commit comments