mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
* All libraries have been isolated from each other, and build into separate artifacts. * Project has been restructured to support isolating libraries. * CCrashHandler now calls a callback on crash (setup from core/dllmain.cpp, this can be setup in any way for any project. This callback is getting called when the apllication crashes. Useful for flushing buffers before closing handles to logging files for example). * Tier0 'CoreMsgV' function now calls a callback sink, which could be set by the user (currently setup to the SDK's internal logger in core/dllmain.cpp). TODO: * Add a batch file to autogenerate all projects. * Add support for dedicated server. * Add support for client dll. Bugs: * Game crashes on the title screen after the UI script compiler has finished (root cause unknown). * Curl error messages are getting logged twice for the dedicated server due to the removal of all "DEDICATED" preprocessor directives to support isolating projects. This has to be fixed properly!
42 lines
1.4 KiB
C++
42 lines
1.4 KiB
C++
#include "tier0_pch.h"
|
|
#include "tier0/platform_internal.h"
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose: gets the process up time in seconds
|
|
// Output : double
|
|
//-----------------------------------------------------------------------------
|
|
double Plat_FloatTime()
|
|
{
|
|
return v_Plat_FloatTime();
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose: gets the process up time in milliseconds
|
|
// Output : uint64_t
|
|
//-----------------------------------------------------------------------------
|
|
uint64_t Plat_MSTime()
|
|
{
|
|
return v_Plat_MSTime();
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose: gets the process up time ( !! INTERNAL ONLY !! DO NOT USE !! ).
|
|
// Output : const char*
|
|
//-----------------------------------------------------------------------------
|
|
const char* Plat_GetProcessUpTime()
|
|
{
|
|
static char szBuf[4096];
|
|
sprintf_s(szBuf, sizeof(szBuf), "[%.3f] ", v_Plat_FloatTime ? Plat_FloatTime() : 0.0);
|
|
|
|
return szBuf;
|
|
}
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose: gets the process up time.
|
|
// Input : *szBuf -
|
|
// nSize -
|
|
//-----------------------------------------------------------------------------
|
|
void Plat_GetProcessUpTime(char* szBuf, size_t nSize)
|
|
{
|
|
sprintf_s(szBuf, nSize, "[%.3f] ", v_Plat_FloatTime ? Plat_FloatTime() : 0.0);
|
|
} |