- Uptime now shows over 49.7 days correctly in Vista or later.

- Some related tweaks.
This commit is contained in:
spx
2011-06-05 12:32:18 +00:00
parent 62c0268fef
commit 3a7d937021
10 changed files with 53 additions and 25 deletions

View File

@ -951,6 +951,32 @@ OSPLATFORM CSystem::GetOSPlatform()
return c_Platform;
}
/*
** GetTickCount64
**
** Retrieves the number of milliseconds that have elapsed since the system was started.
** In XP, returns the predictive value due to the 32bit limitation.
**
*/
ULONGLONG CSystem::GetTickCount64()
{
typedef ULONGLONG (WINAPI * FPGETTICKCOUNT64)();
static FPGETTICKCOUNT64 c_GetTickCount64 = (FPGETTICKCOUNT64)GetProcAddress(GetModuleHandle(L"kernel32"), "GetTickCount64");
if (c_GetTickCount64)
{
return c_GetTickCount64();
}
else
{
static ULONGLONG lastTicks = 0;
ULONGLONG ticks = GetTickCount();
while (ticks < lastTicks) ticks += 0x100000000;
lastTicks = ticks;
return ticks;
}
}
/*
** RmLoadLibrary
**