On Wed, 2 Apr 2014, Luca Olivetti wrote:
El 02/04/14 09:08, Michael Van Canneyt ha escrit:
On Tue, 1 Apr 2014, Mattias Gaertner wrote:
On Tue, 01 Apr 2014 12:20:53 +0200
Luca Olivetti <l...@wetron.es> wrote:
[...]
function GetTickCount64: QWord;
var
tp: timespec;
begin
clock_gettime(CLOCK_MONOTONIC, @tp);
Result := (Int64(tp.tv_sec) * 1000) + (tp.tv_nsec div 1000000);
end;
[...]
Thanks. GetTickCount64 now uses it on Linux.
The implementation in Sysutils now does so too, and uses a fallback
using gettimeofday.
I checked the revision and it looks wrong: fpgettimeofday uses a
TTimeVal (resolution microseconds), while clock_gettime uses TTimeSpec
(resolution nanoseconds). A suitable (I think) fallback could be
CLOCK_REALTIME, e.g.
Indeed.
That's why Pascal offers var arguments instead of pointers, so you notice this
kind of thing when compiling :(
Fixed. Thanks for pointing it out.
Michael.
--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus