[fpc-pascal] Very vague gettickcount64 description?

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Sun Sep 8 21:53:44 CEST 2019


On 07/09/2019 8:42 pm, Zoe Peterson wrote:
> GetTickCount and GetTickCount64 are Windows API functions that are 
> explicitly documented as returning milliseconds,

I have to agree with you. If FPC keeps basing its implementation and
API's on Win32 or Delphi, then it should adhere to their documentation
and expected results. If FPC can't guarantee millisecond accuracy on all
platforms, mark the API with the "platform" modifier and document that
it is only for Windows or platform XYZ etc.

The inconsistencies of GetTickCount() has forced me to use EpikTimer or
alternatives for many years which gives more reliable results and
predictable units of measure.

If FPC really wants timing API's, then implement true cross-platform
API's for timing with documented units and such. eg: Java has
System.nanoTime() and System.currentTimeMillis().
With such API's there is no guesswork as to what the user expects when
calling them, and it's 100% cross-platform.

Regards,
  Graeme

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

My public PGP key:  http://tinyurl.com/graeme-pgp


More information about the fpc-pascal mailing list