NdisGetCurrentSystemTime returning odd values

I need a concept in my driver which is equivalent of “ticks” on linux. I used NdisGetCurrentSystemTime … which is supposed to tick every 100ns.

[Note: I am using %I64u to print out the time … this seems to work quite fine. Thanks to all who responded to my mail on that topic]

I do this:

NdisGetCurrentSystemTime (call 1)

  • simple assignment -

NdisGetCurrentSystemTime (call 2)

I get some disparate results due to this: The diff between call 1 and call 2 is reported as 0 or reported (most of the times) of the order of 15.6 ms!, yes 15.6 millisecs. This is indeed too large a gap. Some explanation of whats going on would help…

a) What is the overhead of making this call. Please give some details - on this

b) If ans. to (a) is - High , is there an alternative way I can use a monotonically increasing counter in my IM driver?

Thanks

-Johnny


Join the world’s largest e-mail service with MSN Hotmail. Click Here

Not so.
NdisGetCurrentSystemTime has a precision of 100ns, but the counter is really updated once per system clock tick - which is 1/100 or 1/64 of second.

Max

----- Original Message -----
From: Johnny D
To: NT Developers Interest List
Sent: Tuesday, April 30, 2002 1:31 AM
Subject: [ntdev] NdisGetCurrentSystemTime returning odd values

I need a concept in my driver which is equivalent of “ticks” on linux. I used NdisGetCurrentSystemTime … which is supposed to tick every 100ns.

[Note: I am using %I64u to print out the time … this seems to work quite fine. Thanks to all who responded to my mail on that topic]

I do this:

NdisGetCurrentSystemTime (call 1)

  • simple assignment -

NdisGetCurrentSystemTime (call 2)

I get some disparate results due to this: The diff between call 1 and call 2 is reported as 0 or reported (most of the times) of the order of 15.6 ms!, yes 15.6 millisecs. This is indeed too large a gap. Some explanation of whats going on would help…

a) What is the overhead of making this call. Please give some details - on this

b) If ans. to (a) is - High , is there an alternative way I can use a monotonically increasing counter in my IM driver?

Thanks

-Johnny


Join the world?s largest e-mail service with MSN Hotmail. Click Here

You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to %%email.unsub%%

So it cannot be off by more than +/- 100 ns. Ok so 1/00 or 1/64 depending on how fast the system clock is?

Thanks
-Johnny

From: “Maxim S. Shatskih”

>Reply-To: “NT Developers Interest List”
>To: “NT Developers Interest List”
>Subject: [ntdev] Re: NdisGetCurrentSystemTime returning odd values
>Date: Tue, 30 Apr 2002 05:00:57 +0400
>
>Not so.
>NdisGetCurrentSystemTime has a precision of 100ns, but the counter is really updated once per system clock tick - which is 1/100 or 1/64 of second.
>
> Max
>
> ----- Original Message -----
> From: Johnny D
> To: NT Developers Interest List
> Sent: Tuesday, April 30, 2002 1:31 AM
> Subject: [ntdev] NdisGetCurrentSystemTime returning odd values
>
>
> I need a concept in my driver which is equivalent of “ticks” on linux. I used NdisGetCurrentSystemTime … which is supposed to tick every 100ns.
>
>
> [Note: I am using %I64u to print out the time … this seems to work quite fine. Thanks to all who responded to my mail on that topic]
>
> I do this:
>
> NdisGetCurrentSystemTime (call 1)
>
> - simple assignment -
>
> NdisGetCurrentSystemTime (call 2)
>
> I get some disparate results due to this: The diff between call 1 and call 2 is reported as 0 or reported (most of the times) of the order of 15.6 ms!, yes 15.6 millisecs. This is indeed too large a gap. Some explanation of whats going on would help…
>
> a) What is the overhead of making this call. Please give some details - on this
>
> b) If ans. to (a) is - High , is there an alternative way I can use a monotonically increasing counter in my IM driver?
>
>
> Thanks
>
> -Johnny
>
>
>------------------------------------------------------------------------------
> Join the world’s largest e-mail service with MSN Hotmail. Click Here
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>
>
>—
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to %%email.unsub%%


Get your FREE download of MSN Explorer at http://explorer.msn.com.

It is incremented in 10ms or 1/64s units, though it is counted in 100ns units.

Max
----- Original Message -----
From: Johnny D
To: NT Developers Interest List
Sent: Tuesday, April 30, 2002 9:17 AM
Subject: [ntdev] Re: NdisGetCurrentSystemTime returning odd values

So it cannot be off by more than +/- 100 ns. Ok so 1/00 or 1/64 depending on how fast the system clock is?

Thanks
-Johnny
>From: “Maxim S. Shatskih”
>Reply-To: “NT Developers Interest List”
>To: “NT Developers Interest List”
>Subject: [ntdev] Re: NdisGetCurrentSystemTime returning odd values
>Date: Tue, 30 Apr 2002 05:00:57 +0400
>
>Not so.
>NdisGetCurrentSystemTime has a precision of 100ns, but the counter is really updated once per system clock tick - which is 1/100 or 1/64 of second.
>
> Max
>
> ----- Original Message -----
> From: Johnny D
> To: NT Developers Interest List
> Sent: Tuesday, April 30, 2002 1:31 AM
> Subject: [ntdev] NdisGetCurrentSystemTime returning odd values
>
>
> I need a concept in my driver which is equivalent of “ticks” on linux. I used NdisGetCurrentSystemTime … which is supposed to tick every 100ns.
>
>
> [Note: I am using %I64u to print out the time … this seems to work quite fine. Thanks to all who responded to my mail on that topic]
>
> I do this:
>
> NdisGetCurrentSystemTime (call 1)
>
> - simple assignment -
>
> NdisGetCurrentSystemTime (call 2)
>
> I get some disparate results due to this: The diff between call 1 and call 2 is reported as 0 or reported (most of the times) of the order of 15.6 ms!, yes 15.6 millisecs. This is indeed too large a gap. Some explanation of whats going on would help…
>
> a) What is the overhead of making this call. Please give some details - on this
>
> b) If ans. to (a) is - High , is there an alternative way I can use a monotonically increasing counter in my IM driver?
>
>
> Thanks
>
> -Johnny
>
>
>------------------------------------------------------------------------------
> Join the world?s largest e-mail service with MSN Hotmail. Click Here
> —
> You are currently subscribed to ntdev as: xxxxx@storagecraft.com
> To unsubscribe send a blank email to %%email.unsub%%
>
>
>—
>You are currently subscribed to ntdev as: xxxxx@hotmail.com
>To unsubscribe send a blank email to %%email.unsub%%


Get your FREE download of MSN Explorer at http://explorer.msn.com.

You are currently subscribed to ntdev as: xxxxx@storagecraft.com
To unsubscribe send a blank email to %%email.unsub%%