mirror of
https://github.com/EnderIce2/Fennix.git
synced 2025-05-27 15:04:31 +00:00
feat(kernel): 🎨 always include the uptime in KPrint output
This commit is contained in:
parent
6592db3f4e
commit
83a7f83f81
@ -76,23 +76,15 @@ EXTERNC void _KPrint(const char *Format, va_list Args)
|
|||||||
{
|
{
|
||||||
SmartLock(KernelLock);
|
SmartLock(KernelLock);
|
||||||
|
|
||||||
if (TimeManager)
|
uint64_t nano = TimeManager ? TimeManager->GetNanosecondsSinceClassCreation() : 0;
|
||||||
{
|
|
||||||
uint64_t Nanoseconds = TimeManager->GetNanosecondsSinceClassCreation();
|
|
||||||
if (Nanoseconds != 0)
|
|
||||||
{
|
|
||||||
#if defined(__amd64__)
|
#if defined(__amd64__)
|
||||||
printf("\x1b[1;30m[\x1b[1;34m%lu.%07lu\x1b[1;30m]\x1b[0m ",
|
printf("\x1b[1;30m[\x1b[1;34m%lu.%07lu\x1b[1;30m]\x1b[0m ", nano / 10000000, nano % 10000000);
|
||||||
Nanoseconds / 10000000, Nanoseconds % 10000000);
|
|
||||||
#elif defined(__i386__)
|
#elif defined(__i386__)
|
||||||
printf("\x1b[1;30m[\x1b[1;34m%llu.%07llu\x1b[1;30m]\x1b[0m ",
|
printf("\x1b[1;30m[\x1b[1;34m%llu.%07llu\x1b[1;30m]\x1b[0m ", nano / 10000000, nano % 10000000);
|
||||||
Nanoseconds / 10000000, Nanoseconds % 10000000);
|
|
||||||
#elif defined(__aarch64__)
|
#elif defined(__aarch64__)
|
||||||
printf("\x1b[1;30m[\x1b[1;34m%lu.%07lu\x1b[1;30m]\x1b[0m ",
|
printf("\x1b[1;30m[\x1b[1;34m%lu.%07lu\x1b[1;30m]\x1b[0m ", nano / 10000000, nano % 10000000);
|
||||||
Nanoseconds / 10000000, Nanoseconds % 10000000);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
vprintf(Format, Args);
|
vprintf(Format, Args);
|
||||||
printf("\x1b[0m\n");
|
printf("\x1b[0m\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user