Changeset 451 for GraphicTest/UMainForm.pas
- Timestamp:
- Nov 23, 2012, 2:09:49 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/UMainForm.pas
r450 r451 130 130 StartTime := NowPrecise; 131 131 FrameCounterStart := NowPrecise; 132 FrameCounterStop := 0; 132 133 FrameCounter := 0; 133 134 repeat … … 140 141 until TestTerminated or 141 142 ((TestTimeout > 0) and ((NowPrecise - StartTime) > OneSecond * TestTimeout)); 142 FPS := GetFPS; 143 FrameCounterStop := NowPrecise; 144 //FPS := GetFPS; 143 145 Done; 144 146 end; … … 157 159 TestMethod(TDrawMethod(DrawMethods[MethodIndex])); 158 160 finally 159 TimerUpdateList.Enabled := False;161 //TimerUpdateList.Enabled := False; 160 162 SingleTestActive := False; 161 163 UpdateInterface; … … 234 236 with TDrawMethod(DrawMethods[Item.Index]) do begin 235 237 Item.Caption := Caption; 238 FPS := GetFPS; 236 239 Item.SubItems.Add(FloatToStr(RoundTo(FPS, -3))); 237 Item.SubItems.Add(FloatToStr(RoundTo(FrameDuration / OneMillisecond, -3))); 240 if FPS > 0 then 241 Item.SubItems.Add(FloatToStr(RoundTo(1 / FPS * 1000, -3))) 242 else Item.SubItems.Add('0'); 238 243 if FrameDuration > 0 then 239 244 Item.SubItems.Add(FloatToStr(RoundTo(1 / (FrameDuration / OneSecond), -3))) 240 245 else Item.SubItems.Add('0'); 241 Item.SubItems.Add(FloatToStr(RoundTo( StepDuration / OneMillisecond, -3)));246 Item.SubItems.Add(FloatToStr(RoundTo(FrameDuration / OneMillisecond, -3))); 242 247 if FrameDuration > 0 then 243 248 Item.SubItems.Add(FloatToStr(RoundTo(1 / (StepDuration / OneSecond), -3))) 244 249 else Item.SubItems.Add('0'); 250 Item.SubItems.Add(FloatToStr(RoundTo(StepDuration / OneMillisecond, -3))); 245 251 end; 246 252 end;
Note:
See TracChangeset
for help on using the changeset viewer.