[*] Amend process creation time. I did a dumb. (bdec6ff8
)
This commit is contained in:
parent
66b948697b
commit
d6739f5196
@ -69,6 +69,8 @@ static void Init()
|
||||
Crypto::InitCrypto();
|
||||
Aurora::IO::TLS::TLSInit();
|
||||
|
||||
(void)AuProcess::GetProcessStartupTimeMS();
|
||||
|
||||
Aurora::Threading::InitSleep();
|
||||
Aurora::Process::InitProcess();
|
||||
Aurora::SWInfo::InitSwInfo();
|
||||
|
@ -7,6 +7,7 @@
|
||||
***/
|
||||
#include <Source/RuntimeInternal.hpp>
|
||||
#include "AuProcessStartTime.hpp"
|
||||
#include <Time/Time.hpp>
|
||||
|
||||
namespace Aurora::Process
|
||||
{
|
||||
@ -19,16 +20,15 @@ namespace Aurora::Process
|
||||
return optKnownWallTime.value();
|
||||
}
|
||||
|
||||
auto uUptime = AuTime::ProcessClockNS();
|
||||
|
||||
if (!uUptime)
|
||||
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
||||
FILETIME creation, exit, kernel, user;
|
||||
if (::GetProcessTimes(GetCurrentProcess(), &creation, &exit, &kernel, &user))
|
||||
{
|
||||
optKnownWallTime = AuTime::CurrentClockNS();
|
||||
}
|
||||
else
|
||||
{
|
||||
optKnownWallTime = AuTime::CurrentClockNS() - uUptime;
|
||||
optKnownWallTime = AuTime::ConvertTimestampNs(creation);
|
||||
}
|
||||
#else
|
||||
optKnownWallTime = AuTime::CurrentClockNS() - AuTime::ThreadClockNS();
|
||||
#endif
|
||||
|
||||
return optKnownWallTime.value();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user