Re: GetTickCount()/timeGetTime across processes

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Slava M. Usov (stripit.slough_at_gmx.net)
Date: 12/09/04


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



Relevant Pages

  • Re: One more questionabout this Rado watch..
    ... Then one tick away it adjusts the hour... ... I just refuse to beleive that this watch would be so utterly stupid, ... as for the perpetual calendar idea, basically you have 31 tooth date wheel flicked around every 24 hours, in most quartz movements that show a date and only have a single stepper motor driving the hands differ little to mechanical watches, to do a perpetual calendar mechanically would push the price of the movement up by quite a bit, or you could do like Seiko's perpetual quartz and have a separate stepper motor for the date. ...
    (alt.horology)
  • Calendars
    ... Am I correct in saying that for the UK I need to tick Daylight savings in ... the system clock on the clients and also tick the daylight savings option in ... If I tick both the system clock and Outlook, then all postings are 1 hour ...
    (microsoft.public.windows.server.sbs)
  • Related to system clock rate
    ... I have a question related to system clock. ... o/p of one second delay ... tick value: 50 ...
    (comp.os.vxworks)
  • Re: GetTickCount()/timeGetTime across processes
    ... it appears that it simply reads the tick counter from the ... maybe that call adjusts the tick count in some way and that adjustment ... So I guess I'll give up trying to correlate client-side ticks with ...
    (microsoft.public.win32.programmer.kernel)
  • Re: GetTickCount()/timeGetTime across processes
    ... it appears that it simply reads the tick counter from the ... > maybe that call adjusts the tick count in some way and that adjustment ...
    (microsoft.public.win32.programmer.kernel)