[*] i did a dumb

This commit is contained in:
Reece Wilson 2023-04-22 22:38:37 +01:00
parent 62c29d0600
commit 945d54ef78

View File

@ -225,7 +225,10 @@ namespace Aurora::Time
// i dont want to measure kernel and driver overhead under benchmarks, i dont think
// im going to consider kernel time = syscalls = ipc to another sandbox/process/thread until i have a reason to change this
// primary use case: microbenchmarks that dont care for external noise
return ConvertTimestamp(user);
ULARGE_INTEGER ullUser;
ullUser.LowPart = user.dwLowDateTime;
ullUser.HighPart = user.dwHighDateTime;
return ullUser.QuadPart * 100ull;
}
#endif
@ -276,7 +279,18 @@ namespace Aurora::Time
FILETIME creation, exit, kernel, user;
if (::GetProcessTimes(GetCurrentThread(), &creation, &exit, &kernel, &user))
{
return ConvertTimestamp(user) + ConvertTimestamp(kernel);
ULARGE_INTEGER ullUser;
{
ullUser.LowPart = user.dwLowDateTime;
ullUser.HighPart = user.dwHighDateTime;
}
ULARGE_INTEGER ullKernel;
{
ullKernel.LowPart = kernel.dwLowDateTime;
ullKernel.HighPart = kernel.dwHighDateTime;
}
return (ullUser.QuadPart + ullKernel.QuadPart) * 100ull;
}
#endif