[Lazarus] Portable way to get accurate timestamps?

Bo Berglund bo.berglund at gmail.com
Sun Feb 20 22:04:29 CET 2011


On Sun, 20 Feb 2011 20:07:32 +0200, Graeme Geldenhuys
<graemeg.lists at gmail.com> wrote:

>On Sun, 2011-02-20 at 12:42 +0100, Bo Berglund wrote:
>
>> In fact I am interested mainly in the time *difference* between
>> successive measured data points.
>
>You can try EpicTimer too. It's only a single unit, easy to use,
>supports multiple timers, stopwatch and various display modes. It's not
>very portable [read not fully implemented] for exotic platforms, but
>works perfectly for my needs under Linux and Windows.
>
>
Now I have tested both the GetTickCount and Now() methods.
I have synched my tests against a GPS receiver to get an accurate
reference.

Turns out that GetTickCount has a sawtooth-like overlaid timing noise
signal which is about 15 ms.

But using Now() I don't see this.

In both cases I could detect a 12 ppm drift in the clock of mt PC.


-- 
Bo Berglund
Developer in Sweden





More information about the Lazarus mailing list