[fpc-pascal] Very vague gettickcount64 description?

Michael Van Canneyt michael at freepascal.org
Sat Sep 7 13:38:56 CEST 2019



On Sat, 7 Sep 2019, Marco van de Voort wrote:

>
> Op 2019-09-06 om 20:02 schreef Michael Van Canneyt:
>
>
>>
>> What I will do is explain in the documentation why the units are not
>> mentioned.
>>
> Can we remove the division in *nix also ? If ms resolution is not 
> supported, then why divide the us/ns ? It serves no purpose, if rollover 
> and unit size are not guaranteed.

I think it should be removed.

If you look at clock_time documentation no guarantees about resolution are given.
there is a call to get resolution, so in the best case you'd need to use
that to get a 'correct' time. It would mean 2 system calls every time, since there
is also no guarantee that the call to get the resolution will give the same
result every time.

Michael.


More information about the fpc-pascal mailing list