[fpc-pascal] Very vague gettickcount64 description?
Martin Frb
lazarus at mfriebe.de
Sun Sep 8 01:41:30 CEST 2019
On 07/09/2019 21:42, Zoe Peterson wrote:
> GetTickCount and GetTickCount64 are Windows API functions that are
> explicitly documented as returning milliseconds, and FPC on Unix up to
> now is has matched that. Why in the world would you think that
> changing that behavior would be a good idea, *especially* if you keep
> the function name the same?!?
>
> As an FPC user, this seems like an astoundingly bad decision to even
> be considering.
>
I do back that.
vague-ness or "the absence of documenting" isĀ not the same as (from the
beginning on) documenting that "the unit is not given, *because* it may
*vary*"
I would suggest to amend the documentation to the current state.
Something like:
----
The length of a tick depends on the platform/OS/...
Therefore a tick can be a different amount of time on different targets.
For the following targets, the ticks are specified as follows. For other
targets they may change, until documented.
Windows: tick = millisecond
Linux: tick = millisecond
OSx/Mac/Darwin: tick = ?
The minimum resolution may vary, and may be more than one tick.
The function itself may also take a varying amount of ticks, and the
returned result may on top of resolution issues be outdated by any
amount of ticks.
More information about the fpc-pascal
mailing list