[ros-kernel] Kernel system time query - is it really working?

Mike Nordell tamlin at algonet.se
Tue Mar 9 14:42:54 CET 2004


Either I have my head screwed on the wrong way today, or KeQuerySystemTime
requires some commenting.

This function busy-waits for SharedUserData->SystemTime.High2Part to be
changed. Now, I don't really see the reson for these High1Part/High2Part
variables. Is this really how they are named and used in NT?

The reason for my question is that according to my understanding, of 100
timer interrupts/second and therefore 100 calls/s to KiUpdateSystemTime, the
QuadPart of that LARGE_INTEGER would be incremented by 100000 (1e5) 100
times/second, meaning 1e7/second. However, since the LowPart is a 32-bit
unsigned value, it would mean possibly 2^32/1e7 seconds until the HighPart
changed. That's ~429 seconds, or over seven minutes.

Again, either my head is screwed on the wrong way, a comment is missing from
KiUpdateSystemTime to explain exactly how this could work, or it has
actually not been tested with this new implementation.

Comments?

/Mike



More information about the Ros-kernel mailing list