[fpc-pascal] Very vague gettickcount64 description?
zoe at scootersoftware.com
Mon Sep 9 18:32:23 CEST 2019
On 9/8/2019 2:09 AM, Michael Van Canneyt wrote:
> For relative measurements, units are not needed. A ratio has no units, the
> only thing that is required is that the units for both measurements are the
> same (which should be the case on a single platform).
That's fair. GetTickCount is also the best thing for quickly checking
timeouts and the like though. I can certainly agree that FPC would
benefit from a function that can return platform-specific timing data as
quickly as possible, but that should just be called something else.
> But I have re-checked the Microsoft documentation, the implementation, and
> have added millisecond units to documentation of gettickcount(64).
Thank you :)
> Note that the FPC implementation gives an increasing time, not the
> number of
> milliseconds elapsed since system boot. Which is what, strictly speaking,
> it should return to comply to the Microsoft implementation.
That seems like a reasonable restriction to me. Needing the actual
system uptime is going to be a much rarer than profiling or checking
elapsed times, and supporting that aspect would be in conflict with
making the function low overhead.
More information about the fpc-pascal