Schedule NTP sync for midnight and update comment

This commit is contained in:
2024-05-16 16:16:53 +01:00
parent 2dedcb2b86
commit 792a84782d

3
app.py
View File

@@ -244,8 +244,9 @@ class App:
started = False
while (True):
gc.collect()
if (time.localtime()[3] == 0): ntptime.settime()
changed = not started or self.__changeScreen()
# TODO: make screen not change within given interval, as holding button too long changes it twice
# TODO: make buttons not work until certain delay after release, as holding button too long actions it twice
if (not started): started = True
# if the screen has changed, redraw the whole screen
if (changed):