[Lazarus] How to program with time in milliseconds?

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Thu May 15 13:42:29 CEST 2014


Michael Van Canneyt wrote:

> For timers and whatnot, the fpgettimeofday call is simply not suitable. 
> It is an incredibly slow call, and needs to be replaced with something 
> else.
> get_clock() seems to be the way to go. vSDO is a very specific linux 
> mechanism; I would recommend against it.

I note that IBM mainframes have a counter which is defined as 
incrementing one particular bit at a 1mSec rate. The behaviour of bits 
to its right varies depending on the machine, and bits to its left count 
as expected. I can't remember the fixed-rate bit position, but it 
strikes me as an elegant intermediate format where an absolute date etc. 
isn't needed.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list