Author: sginsberg
Date: Mon Jan 5 11:51:55 2009
New Revision: 38587
URL:
http://svn.reactos.org/svn/reactos?rev=38587&view=rev
Log:
- Properly implement NdisGetSystemUpTime, based on
http://www.tech-archive.net/Archive/Development/microsoft.public.developmen…
Modified:
trunk/reactos/drivers/network/ndis/ndis/stubs.c
Modified: trunk/reactos/drivers/network/ndis/ndis/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
==============================================================================
--- trunk/reactos/drivers/network/ndis/ndis/stubs.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/ndis/ndis/stubs.c [iso-8859-1] Mon Jan 5 11:51:55 2009
@@ -532,17 +532,19 @@
*/
VOID
EXPORT
-NdisGetSystemUpTime(
- OUT PULONG pSystemUpTime)
-/*
- * FUNCTION:
- * ARGUMENTS:
- * NOTES:
- * NDIS 5.0
- */
+NdisGetSystemUpTime(OUT PULONG pSystemUpTime)
{
- /* Get the uptime of the system in msec */
- *pSystemUpTime = ( (SharedUserData->TickCountLowDeprecated *
SharedUserData->TickCountMultiplier) / 0x1000000);
+ ULONG Increment;
+ LARGE_INTEGER TickCount;
+
+ /* Get the increment and current tick count */
+ Increment = KeQueryTimeIncrement();
+ KeQueryTickCount(&TickCount);
+
+ /* Convert to milliseconds and return */
+ TickCount.QuadPart *= Increment;
+ TickCount.QuadPart /= (10 * 1000);
+ *pSystemUpTime = TickCount.LowPart;
}