Changeset 319 for GraphicTest/UMainForm.pas
- Timestamp:
- Feb 1, 2012, 3:50:43 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/UMainForm.pas
r318 r319 117 117 118 118 procedure TMainForm.ButtonSingleTestClick(Sender: TObject); 119 var 120 StepStartTime: TDateTime; 119 121 begin 120 122 try … … 129 131 Application.ProcessMessages; 130 132 repeat 133 StepStartTime := NowPrecise; 131 134 DrawFrameTiming(TFastBitmap(Scenes[SceneIndex])); 132 135 SceneIndex := (SceneIndex + 1) mod Scenes.Count; 133 136 Application.ProcessMessages; 137 StepDuration := NowPrecise - StepStartTime; 134 138 until not SingleTestActive; 135 139 end; … … 146 150 C: Integer; 147 151 StartTime: TDateTime; 152 StepStartTime: TDateTime; 148 153 begin 149 154 try … … 158 163 StartTime := NowPrecise; 159 164 repeat 165 StepStartTime := NowPrecise; 160 166 DrawFrameTiming(TFastBitmap(Scenes[SceneIndex])); 161 167 SceneIndex := (SceneIndex + 1) mod Scenes.Count; 162 168 Application.ProcessMessages; 169 StepDuration := NowPrecise - StepStartTime; 163 170 until ((NowPrecise - StartTime) > OneSecond * FloatSpinEdit1.Value) or not AllTestActive; 164 171 end; … … 204 211 if FrameDuration > 0 then 205 212 Item.SubItems.Add(FloatToStr(RoundTo(1 / (FrameDuration / OneSecond), -3))) 213 else Item.SubItems.Add('0'); 214 Item.SubItems.Add(FloatToStr(RoundTo(StepDuration / OneMillisecond, -3))); 215 if FrameDuration > 0 then 216 Item.SubItems.Add(FloatToStr(RoundTo(1 / (StepDuration / OneSecond), -3))) 206 217 else Item.SubItems.Add('0'); 207 218 end;
Note:
See TracChangeset
for help on using the changeset viewer.