mirror of
https://github.com/reactos/reactos.git
synced 2025-02-25 01:39:30 +00:00
- Properly implement NdisGetSystemUpTime, based on http://www.tech-archive.net/Archive/Development/microsoft.public.development.device.drivers/2004-11/0616.html
svn path=/trunk/; revision=38587
This commit is contained in:
parent
3f64101cc9
commit
c5c778d46e
1 changed files with 12 additions and 10 deletions
|
@ -532,17 +532,19 @@ NdisGetReceivedPacket(
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID
|
||||||
EXPORT
|
EXPORT
|
||||||
NdisGetSystemUpTime(
|
NdisGetSystemUpTime(OUT PULONG pSystemUpTime)
|
||||||
OUT PULONG pSystemUpTime)
|
|
||||||
/*
|
|
||||||
* FUNCTION:
|
|
||||||
* ARGUMENTS:
|
|
||||||
* NOTES:
|
|
||||||
* NDIS 5.0
|
|
||||||
*/
|
|
||||||
{
|
{
|
||||||
/* Get the uptime of the system in msec */
|
ULONG Increment;
|
||||||
*pSystemUpTime = ( (SharedUserData->TickCountLowDeprecated * SharedUserData->TickCountMultiplier) / 0x1000000);
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue