diff --git a/source/Sysmodule/source/log.cpp b/source/Sysmodule/source/log.cpp index e52b088..c44e17e 100644 --- a/source/Sysmodule/source/log.cpp +++ b/source/Sysmodule/source/log.cpp @@ -33,15 +33,12 @@ void WriteToLog(const char *fmt, ...) { std::scoped_lock printLock(printMutex); - u64 ts; - TimeCalendarTime caltime; - timeGetCurrentTime(TimeType_LocalSystemClock, &ts); - timeToCalendarTimeWithMyRule(ts, &caltime, nullptr); + ams::TimeSpan ts = ams::os::ConvertToTimeSpan(ams::os::GetSystemTick()); FILE *fp = fopen(LOG_PATH, "a"); //Print time - fprintf(fp, "%04i-%02i-%02i %02i:%02i:%02i: ", caltime.year, caltime.month, caltime.day, caltime.hour, caltime.minute, caltime.second); + fprintf(fp, "%02lid %02li:%02li:%02li: ", ts.GetDays(), ts.GetHours() % 24, ts.GetMinutes() % 60, ts.GetSeconds() % 60); //Print the actual text va_list va; diff --git a/source/Sysmodule/source/main.cpp b/source/Sysmodule/source/main.cpp index 272ec8c..5e65103 100644 --- a/source/Sysmodule/source/main.cpp +++ b/source/Sysmodule/source/main.cpp @@ -62,7 +62,6 @@ extern "C" void __appInit(void) hosversionSet(MAKEHOSVERSION(fw.major, fw.minor, fw.micro)); setsysExit(); - R_ABORT_UNLESS(timeInitialize()); R_ABORT_UNLESS(hiddbgInitialize()); if (hosversionAtLeast(7, 0, 0)) R_ABORT_UNLESS(hiddbgAttachHdlsWorkBuffer()); @@ -82,7 +81,6 @@ extern "C" void __appExit(void) hiddbgExit(); fsdevUnmountAll(); fsExit(); - timeExit(); } using namespace syscon;