This commit is contained in:
Adrien Bourmault 2019-05-05 17:37:01 +02:00
parent a567abb97f
commit dc91276334
2 changed files with 14 additions and 10 deletions

View File

@ -85,15 +85,19 @@ noreturn void BtStartKern(multiboot_info_t *mbInfo, uint mbMagic, void *codeSeg)
IoPrintRtcTime();
KernLog("There was %d ticks\n", IoGetRtcTicks());
uint i = 0;
while (1) {
if (!(i % (2048*5))) IoPrintRtcTime();
KePauseCPU();
i++;
}
/* KernLog("There was %d ticks\n", IoGetRtcTicks()); */
/* uint i = 0; */
/* while (1) { */
/* if (!(i % (2048*5))) IoPrintRtcTime(); */
/* KePauseCPU(); */
/* i++; */
/* } */
char * cc = IoGetRtcTimeChar();
KernLog("End at %s\n", cc);
KernLog("Goodbye after %d ticks\n", IoGetRtcTicks());
// End this machine's suffering
BStdOut->flusher(BStdOut);
KeCrashSystem();
}

View File

@ -164,8 +164,8 @@ void IoPrintRtcTime(void)
char* IoGetRtcTimeChar(void)
{
Time_t* RtcTime = IoGetRtcTime();
char* timeChar = "";
sprintf(timeChar, "[RTC Time] %d/%d/%d ; %d:%d:%d\n",
char* timeChar = "";
sprintf(timeChar, "%hhd/%hhd/%hd ; %hhd:%hhd:%hhd",
RtcTime->day,
RtcTime->month,
RtcTime->year + RtcTime->century*100,