[fpc-pascal] Sub-millisecond time measuring

Adriaan van Os adriaan at adriaan.biz
Sat Jun 29 12:43:26 CEST 2024


Hairy Pixels via fpc-pascal wrote:
> I had a large function which I was profiling with MilliSecondsBetween but I split it to be called many different times and now it's not accumulating the total time correctly because time is being lost to due millisecond precision.
> 
> Is there anything in the RTL I can use which is more accurate? I searched and couldn't find anything.

You can use Microseconds on MacOS, QueryPerformanceFrequency on Windows and g_get_monotonic_time 
with gtk on Linux.

Regards,

Adriaan van Os



More information about the fpc-pascal mailing list