Description | Hierarchy | Fields | Methods | Properties |
type TAdPerformanceCounter = class(TObject)
Class for calculating the FPS and the TimeGap.
![]() |
constructor Create(ACreatePaused:boolean=false); |
![]() |
procedure Resume; |
![]() |
procedure Pause; |
![]() |
procedure Calculate; |
![]() |
property State: TAdPerformanceCounterState read FState; |
![]() |
property FPS: integer read FFPS; |
![]() |
property TimeGap: double read FTimeGap; |
![]() |
property Interpolate: Boolean read FInterpolate write FInterpolate; |
![]() |
property InterpolationFactor: integer read FInterpolationFactor write FInterpolationFactor; |
![]() |
property MaximumTimeGap: double read FMaximumTimeGap write FMaximumTimeGap; |
![]() |
property MaximumFrameRate: integer read FMaximumFrameRate write FMaximumFrameRate; |
![]() |
constructor Create(ACreatePaused:boolean=false); |
Creates a new instance of TAdPerformanceCounter. Parameters
|
![]() |
procedure Resume; |
If the performance counter was paused (suspended), resume makes the counter to calculate the time-between frames again. |
![]() |
procedure Pause; |
Pauses the counter. TimeGap will always be zero. |
![]() |
procedure Calculate; |
Makes the counter to calculate the FPS and the time between this and the last call of "Calculate". |
![]() |
property State: TAdPerformanceCounterState read FState; |
Contains the current state of the performance counter. See also
|
![]() |
property FPS: integer read FFPS; |
Contains the current FPS. FPS is calculated every second by counting the ticks passed. |
![]() |
property TimeGap: double read FTimeGap; |
TimeGap is the time that passed between the last two calls of the "Calculate" function. Zero if the counter is paused. The result is in milliseconds. |