From: <ah...@us...> - 2009-03-04 18:07:27
|
Revision: 2673 http://jcl.svn.sourceforge.net/jcl/?rev=2673&view=rev Author: ahuser Date: 2009-03-04 18:07:18 +0000 (Wed, 04 Mar 2009) Log Message: ----------- As usual: Delphi 5 compilation fixed Modified Paths: -------------- trunk/jcl/source/common/JclSysInfo.pas Modified: trunk/jcl/source/common/JclSysInfo.pas =================================================================== --- trunk/jcl/source/common/JclSysInfo.pas 2009-03-04 17:47:03 UTC (rev 2672) +++ trunk/jcl/source/common/JclSysInfo.pas 2009-03-04 18:07:18 UTC (rev 2673) @@ -4234,6 +4234,16 @@ end; {$ENDIF UNIX} {$IFDEF MSWINDOWS} + + {$IFDEF COMPILER5} + function IsZero(const A: Double): Boolean; + const + DoubleResolution = 1E-15 * 1000; + begin + Result := Abs(A) <= DoubleResolution; + end; + {$ENDIF COMPILER5} + var T0, T1: Int64; CountFreq: Int64; @@ -4302,7 +4312,7 @@ TotalCycles := TotalCycles + Cycles; // avoid division by zero - if Math.IsZero(Ticks) then + if IsZero(Ticks) then Freq := High(Freq) else Freq := Round(Cycles / Ticks); @@ -4311,7 +4321,7 @@ end; // avoid division by zero - if Math.IsZero(TotalTicks) then + if IsZero(TotalTicks) then begin Freq3 := High(Freq3); Freq2 := High(Freq2); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |