diff --git a/Src/Model3/RTC72421.cpp b/Src/Model3/RTC72421.cpp index 7cc2c27..d5490ef 100644 --- a/Src/Model3/RTC72421.cpp +++ b/Src/Model3/RTC72421.cpp @@ -33,7 +33,7 @@ #include "RTC72421.h" -#include +#include #include "Supermodel.h" @@ -43,11 +43,16 @@ UINT8 CRTC72421::ReadRegister(unsigned reg) { - time_t currentTime; - struct tm *Time; + static time_t oldTime{0}; + time_t currentTime; + static struct tm *Time; time(¤tTime); - Time = localtime(¤tTime); + if (currentTime != oldTime) + { + Time = localtime(¤tTime); + oldTime = currentTime; + } switch (reg&0xF) {