[Lazarus] How to program with time in milliseconds?
Michael Schnell
mschnell at lumino.de
Fri May 16 08:28:05 CEST 2014
On 05/15/2014 07:34 PM, Junior wrote:
> I need precision, I'll be working with many timers in milliseconds.
>
> (Windows 32 bits/64bits; Linux 32 bits/64bits; Android; MacOS; among
> others)
>
No normal (not dedicatedtly "realtime") OS provides "decent" millisecond
precision. The OS might stall any program at any time for seconds.
But a game is not supposed to be "hard realtime" but "very soft
realtime". Hence it should not matter if such glitches once and again.
I supposed, an enhanced version of "EpicTimer" might be useful. Decent
arch/OS independent sub-millisecond timer support (e.g. using
QueryPerformanceCounter and "clock_gettime" via vDSO) would be even nicer.
-Michael
More information about the Lazarus
mailing list