On 08/09/2019 1:07 am, Alexander Grotewohl wrote: > every call to gettickcount is something > like 10-15ms or so off.
Martin's suggested documentation "The minimum resolution may vary...." makes that very clear. Also anybody that works with timing API's should know that each platform has different minimum resolutions. eg: I quickly found out that FreeBSD can give better minimum resolutions than Linux, and in turn Linux can give better minimum resolutions than Windows. Thats if you don't use specialized hardware and only rely and the platform's OS timing implementations. Simply mentioning "The minimum resolution may vary" should be good enough. And if you want to go the extra mile, mention that simply calling the API twice after each other (no other lines of code in-between) and then viewing the difference should give you a good indication of the platform's minimum resolution after a few samples and avg result. 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 _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal