Extremely weird behavior with Now function (D6)

Giganews Newsgroups
Subject: Extremely weird behavior with Now function (D6)
Posted by:  Tommi Prami (tommi.nospam.prami@poista.ecomond.com)
Date: Wed, 19 Mar 2008

Hello,

I have following debug code on app It seemed that I was not able to
track processing time. This code and it's "surroundings" are called from
TTimer with 5000 msec interval,

LNow := Now;
if FNow <> 0 then
begin
  LTimeDiff := LNow - FNow;
end;
FNow := LNow;

What is puzzling here that LNow gets same value every single time, if I
debug into Now function there will be correct value, it least it seems
to change trough time (I will investigate this a little bit more), what
can change the value??? And before this Debug code I did pass value
directly from Now function tu the MilliSecondsBetween or MilliSecondSpan
functions with same behavior???

Any ideas on this???

-Tommi Prami-

Replies