Author: janderwald
Date: Sat Apr 5 08:46:41 2008
New Revision: 32873
URL:
http://svn.reactos.org/svn/reactos?rev=32873&view=rev
Log:
- use GetTickCount64 over GetSystemTime as the time reported has more reasonable values
:)
Modified:
trunk/reactos/dll/cpl/ncpa/ncpa.c
Modified: trunk/reactos/dll/cpl/ncpa/ncpa.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/ncpa/ncpa.c?rev=32…
==============================================================================
--- trunk/reactos/dll/cpl/ncpa/ncpa.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/ncpa/ncpa.c [iso-8859-1] Sat Apr 5 08:46:41 2008
@@ -551,9 +551,7 @@
if (pIfRow->dwIndex == pGlobalData->pCurrentAdapterInfo->Index)
{
DWORD DurationSeconds;
- SYSTEMTIME SystemTime;
- FILETIME SystemFileTime;
- ULARGE_INTEGER LargeSystemTime;
+ ULONGLONG Ticks;
PktsOut = pIfRow->dwOutOctets;
PktsIn = pIfRow->dwInOctets;
@@ -561,11 +559,8 @@
OperStatus = pIfRow->dwOperStatus;
/* TODO: For some unknown reason, this doesn't correspond to the Windows
duration */
- GetSystemTime(&SystemTime);
- SystemTimeToFileTime(&SystemTime, &SystemFileTime);
- LargeSystemTime = *(ULARGE_INTEGER *)&SystemFileTime;
- LargeSystemTime.QuadPart /= 100000ULL;
- DurationSeconds = ((LargeSystemTime.LowPart - pIfRow->dwLastChange) / 100);
+ Ticks = GetTickCount64();
+ DurationSeconds = Ticks / 1000;
TimeConnected.wSecond = (DurationSeconds % 60);
TimeConnected.wMinute = (DurationSeconds / 60) % 60;
TimeConnected.wHour = (DurationSeconds / (60 * 60)) % 24;