Make it easier to distinguish netconsole logs from rcon logs

Log net console timestamps with parentheses, and rcon logs with brackets. This makes it much easier to determine who the owner of the log is.
This commit is contained in:
Kawe Mazidjatari 2023-04-19 02:05:58 +02:00
parent 39445eecc4
commit 8aed88a0b5

View File

@ -78,10 +78,16 @@ uint64 Plat_USTime()
return (uint64)((CurrentTime.QuadPart - g_ClockStart.QuadPart) * g_PerformanceCounterToUS);
}
#ifdef NETCONSOLE
#define TIMER_FORMAT "(%.3f) "
#else
#define TIMER_FORMAT "[%.3f] "
#endif // NETCONSOLE
const char* Plat_GetProcessUpTime()
{
static char szBuf[4096];
sprintf_s(szBuf, sizeof(szBuf), "[%.3f] ", Plat_FloatTime());
sprintf_s(szBuf, sizeof(szBuf), TIMER_FORMAT, Plat_FloatTime());
return szBuf;
}