[*] 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();
|
Crypto::InitCrypto();
|
||||||
Aurora::IO::TLS::TLSInit();
|
Aurora::IO::TLS::TLSInit();
|
||||||
|
|
||||||
|
(void)AuProcess::GetProcessStartupTimeMS();
|
||||||
|
|
||||||
Aurora::Threading::InitSleep();
|
Aurora::Threading::InitSleep();
|
||||||
Aurora::Process::InitProcess();
|
Aurora::Process::InitProcess();
|
||||||
Aurora::SWInfo::InitSwInfo();
|
Aurora::SWInfo::InitSwInfo();
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
***/
|
***/
|
||||||
#include <Source/RuntimeInternal.hpp>
|
#include <Source/RuntimeInternal.hpp>
|
||||||
#include "AuProcessStartTime.hpp"
|
#include "AuProcessStartTime.hpp"
|
||||||
|
#include <Time/Time.hpp>
|
||||||
|
|
||||||
namespace Aurora::Process
|
namespace Aurora::Process
|
||||||
{
|
{
|
||||||
@ -19,16 +20,15 @@ namespace Aurora::Process
|
|||||||
return optKnownWallTime.value();
|
return optKnownWallTime.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto uUptime = AuTime::ProcessClockNS();
|
#if defined(AURORA_IS_MODERNNT_DERIVED)
|
||||||
|
FILETIME creation, exit, kernel, user;
|
||||||
if (!uUptime)
|
if (::GetProcessTimes(GetCurrentProcess(), &creation, &exit, &kernel, &user))
|
||||||
{
|
{
|
||||||
optKnownWallTime = AuTime::CurrentClockNS();
|
optKnownWallTime = AuTime::ConvertTimestampNs(creation);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
optKnownWallTime = AuTime::CurrentClockNS() - uUptime;
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
optKnownWallTime = AuTime::CurrentClockNS() - AuTime::ThreadClockNS();
|
||||||
|
#endif
|
||||||
|
|
||||||
return optKnownWallTime.value();
|
return optKnownWallTime.value();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user