Add ms to time display when periodically "set_time()"
This commit is contained in:
parent
b7a3387c5f
commit
c97b1ab2fa
@ -285,6 +285,7 @@ while True:
|
|||||||
time_to_test = rtc.datetime()
|
time_to_test = rtc.datetime()
|
||||||
|
|
||||||
if time_to_test[5] + time_to_test[6] == 0: # (chaque heure quand min et sec = 0)
|
if time_to_test[5] + time_to_test[6] == 0: # (chaque heure quand min et sec = 0)
|
||||||
print("Old Time: {0:04d}/{1:02d}/{2:02d}_{4:02d}:{5:02d}:{6:02d}.{7}".format(*time_to_test))
|
print("Old Time: {0:04d}/{1:02d}/{2:02d}_{4:02d}:{5:02d}:{6:02d}.{7:03d}".format(*time_to_test))
|
||||||
set_rtc()
|
set_rtc()
|
||||||
print("Time set: {0:04d}/{1:02d}/{2:02d}_{4:02d}:{5:02d}:{6:02d}.{7}".format(*rtc.datetime()))
|
print("Time set: {0:04d}/{1:02d}/{2:02d}_{4:02d}:{5:02d}:{6:02d}.{7:03d}".format(*rtc.datetime()))
|
||||||
|
time.sleep(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user