- procedure TForm1.IdleHandler(Sender: TObject; var Done: Boolean);
- begin
- Render;
- Inc(FrameCount);
- timecount:=GetTickCount+rest;
- if timecount-StartTime >= 1000 then begin
- rest:= (timecount-StartTime) - 1000;
- StartTime:= GetTickCount;
- Frames:= FrameCount;
- FrameCount:= 0;
- inc(sekcount);
- Caption:= InttoStr(Frames) + ' FPS - R ' + inttostr(rest) + ' - TC '+inttostr(GetTickCount)
- +' - N '+InttoStr(sekcount);
- ErrorHandler;
- end;
- sleep(1);
- Done:= false;
- end;