Changeset 451 for GraphicTest/UDrawMethod.pas
- Timestamp:
- Nov 23, 2012, 2:09:49 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/UDrawMethod.pas
r449 r451 30 30 FrameCounter: Integer; 31 31 FrameCounterStart: TDateTime; 32 FrameCounterStop: TDateTime; 32 33 function GetFPS: Real; 33 34 property FPS: Real read FFPS write FFPS; … … 180 181 181 182 function TDrawMethod.GetFPS: Real; 182 begin 183 Result := FrameCounter / ((NowPrecise - FrameCounterStart) / OneSecond); 184 FrameCounter := 0; 185 FrameCounterStart := NowPrecise; 183 var 184 StopTime: TDateTime; 185 begin 186 if FrameCounterStop <> 0 then StopTime := FrameCounterStop 187 else StopTime := NowPrecise; 188 if FrameCounter > 0 then begin 189 Result := FrameCounter / ((StopTime - FrameCounterStart) / OneSecond); 190 //FrameCounter := 0; 191 //FrameCounterStart := NowPrecise; 192 end else Result := FFPS; 186 193 end; 187 194
Note:
See TracChangeset
for help on using the changeset viewer.