[fpc-pascal] Sub-millisecond time measuring
Graeme Geldenhuys
mailinglists at geldenhuys.co.uk
Sat Jun 29 17:46:14 CEST 2024
On 28/06/2024 22:50, Hairy Pixels via fpc-pascal wrote:
> But that's still millisecond precision.
On Windows, Linux and FreeBSD it uses nanosecond precision.
Unfortunately on MacOS, it falls back to RTL's GetTickCount64(), which
as you mentioned, is millisecond precision. It shouldn't be hard to add
higher precision for MacOS too - you just need the correct system call.
EpikTimer's code is pretty simple to follow, if you wanted to take a look.
Regards,
Graeme
More information about the fpc-pascal
mailing list