[Lazarus] How to program with time in milliseconds?

Michael Schnell mschnell at lumino.de
Thu May 15 09:36:02 CEST 2014


On 05/14/2014 09:44 PM, Michael Van Canneyt wrote:
>
> Hopefully you got rid of the fpgettimeofday, or else the component is 
> no better than using Now() :-)
Michael,

Even though I of course was aware of this, I did used fpgettimeofday to 
implement TTimer with the "ActiveNoGui" WidgetType, as I did not find 
something more appropriate in the RTL.

Of course I could try to directly use the X86's "Performance counter" 
register, but there were discussions if same would by reliable usable in 
CPU / OS combinations. I also could try to use of course I do need vDSO 
in Linux arcs (is that always available ?) Of course in the end I need 
something that works for any CPU and OS.

At best, fpgettimeofday itself should be improved (maybe using 
"Performance counter" register if the Arch allows for or vDSO if the OS 
allows for).

-Michael





More information about the Lazarus mailing list