Re: GetTickCount()/timeGetTime across processes
From: Slava M. Usov (stripit.slough_at_gmx.net)
Date: 12/09/04
- Next message: Chuck Chopp: "Re: detecting cached credentials on NT/2K/XP/03"
- Previous message: Ivan Brugiolo [MSFT]: "Re: SetUnhandledExceptionFilter and Crash dumps do not work on XP SP2"
- In reply to: Uwe: "Re: GetTickCount()/timeGetTime across processes"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 9 Dec 2004 18:30:11 +0100
"Uwe" <ub@liant.com> wrote in message
news:OY3CnMg3EHA.2180@TK2MSFTNGP10.phx.gbl...
> I just stepped through the call to ::timeGetTime() in assembly language,
> and it's doing more than just picking up a counter. There are various
> tests, it picks up a 64-bit quantity in EDX:EAX, subtracts it, calls a
> subroutine which performs a division, etc. It's not a great deal of code
> (less than 100 instructions) but without source, it's pretty inscrutable.
It all does not matter. It takes the one and only timestamp maintained by
the system and then converts it to a value in conventional time units. The
conversion does not depend on the caller.
> I wonder if any of this has something to do with ::timeBeginPeriod() --
> maybe that call adjusts the tick count in some way and that adjustment
> depends on exactly when the function is called.
Correct. timeBeginPEriod() will increase the frequence of the system clock,
that is why the conversion is required.
> So I guess I'll give up trying to correlate client-side ticks with
> server-side ticks. It would still be nice to have a statement in the
> definition for the function that the tick count value can't be correlated
> across process (or maybe even thread) boundaries.
It can be, it should just be done correctly, as I hinted in another
message.
S
- Next message: Chuck Chopp: "Re: detecting cached credentials on NT/2K/XP/03"
- Previous message: Ivan Brugiolo [MSFT]: "Re: SetUnhandledExceptionFilter and Crash dumps do not work on XP SP2"
- In reply to: Uwe: "Re: GetTickCount()/timeGetTime across processes"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|