|
From: <man...@us...> - 2012-03-27 17:13:59
|
Revision: 1518
http://graphics32.svn.sourceforge.net/graphics32/?rev=1518&view=rev
Author: mandersson
Date: 2012-03-27 17:13:53 +0000 (Tue, 27 Mar 2012)
Log Message:
-----------
Added missing TPerfTimer.ReadSeconds method for FPC.
Modified Paths:
--------------
trunk/Source/GR32_System.pas
Modified: trunk/Source/GR32_System.pas
===================================================================
--- trunk/Source/GR32_System.pas 2012-03-26 22:53:40 UTC (rev 1517)
+++ trunk/Source/GR32_System.pas 2012-03-27 17:13:53 UTC (rev 1518)
@@ -143,6 +143,15 @@
Result := IntToStr( ( (Int64(t.tv_sec) * 1000000) + t.tv_usec ) * 1000 );
end;
+function TPerfTimer.ReadSeconds: string;
+var
+ t : timeval;
+begin
+ fpgettimeofday(@t,nil);
+ // Build a 64 bit microsecond tick from the seconds and microsecond longints
+ Result := IntToStr( ( (Int64(t.tv_sec) * 1000000) + t.tv_usec ) );
+end;
+
function TPerfTimer.ReadValue: Int64;
var t : timeval;
begin
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|