nx chronos
1.0.0
Cross-platform stopwatch with similar functionality to TStopwatch, but it
allows measuring different times: real time, process time, and thread time,
including highly accurate process cycles and thread cycles.
If you are measuring cycles, you will only be able to get a raw Elapsed value
that cannot be converted to nanoseconds, milliseconds, or seconds.
ProcessCycles and ThreadCycles measuring modes are supported only Windows
Vista and newer OS.
var
ts: TNxChronometer;
begin
ts := TNxChronometer.Start(ProcessTime);
// code to be measured
...
ts.Stop;
Writeln('Process time: ', ts.ElapsedMs);
end;https://dalija.prasnikar.info