On 04/01/2014 01:57 PM, Henry Vermaak wrote:
On Tue, Apr 01, 2014 at 12:45:54PM +0200, zeljko wrote:
On 04/01/2014 12:20 PM, Luca Olivetti wrote:

For linux a more accurate implementation could be

function GetTickCount64: QWord;
var
   tp: timespec;
begin
   clock_gettime(CLOCK_MONOTONIC, @tp);
   Result := (Int64(tp.tv_sec) * 1000) + (tp.tv_nsec div 1000000);
end;


And I say linux because CLOCK_MONOTONIC is only defined there in fpc,
though it should be available even in other systems:

CLOCK_MONOTONIC is available only for kernels >= 2.6.26.

No, it's been around since before 2.6.

You're right. I've been on CLOCK_MONOTONIC_RAW which is available since 2.6.28 actually .... so my complete information was wrong ;)

zeljko


--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to