procedure TCnTimerMgr.DoTimer(Sync: Boolean);
var
i: Integer;
CurrTick: Int64; // 这个原来是cardinal,改为int64即可
begin
with FTimerList.LockList do
try
CurrTick := timeGetTime;
for i := 0 to Count - 1 do
with TCnTimerObject(Items) do
if Enabled and (FSyncEvent = Sync) and(Interval <> 0) and
(CurrTick - FLastTickCount >= Interval) and Assigned(FOnTimer) then // 在这里升起EIntOverflow异常
begin
if CurrTick <> FLastTickCount then
FActualFPS := 1000 / (CurrTick - FLastTickCount)
else
FActualFPS := 0;
FLastTickCount := CurrTick;
try
Timer;
except
Application.HandleException(Self);
end;
end;
finally
FTimerList.UnlockList;
end;
end;