mirror of
https://github.com/cathery/sys-con.git
synced 2024-11-16 14:09:51 +00:00
Don't use time services, replace with system ticks
This commit is contained in:
parent
dfa3d387bd
commit
8871e0073e
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user