Hallo,
in freepascal läuft es so:
Delphi-Quellcode:
{dateih.inc}
const
HoursPerDay = 24;
MinsPerHour = 60;
SecsPerMin = 60;
MSecsPerSec = 1000;
MinsPerDay = HoursPerDay * MinsPerHour;//1440
SecsPerDay = MinsPerDay * SecsPerMin; //86400
MSecsPerDay = SecsPerDay * MSecsPerSec; //86400000
..
{dateutil.inc}
const
OneMillisecond = 1/MSecsPerDay;
Function SameDateTime(const A, B: TDateTime): Boolean;
begin
Result:=Abs(A-B)<OneMilliSecond;
end;
Function CompareDateTime(const A, B: TDateTime): TValueRelationship;
begin
If SameDateTime(A,B) then
Result:=EqualsValue
else If A>B then
Result:=GreaterThanValue
else
Result:=LessThanValue
end;
Das wäre ja leicht zu testen, ob es so wieder schneller wäre
Gruß Horst