Class TTimerPool (unit Timers)

Inherits from

TObject

Constructors


constructor Create;

********************************** TTimerPool **********************************


Functions

function Add(ATriggerProc: TTriggerEvent; AInterval: LongInt): Integer;


function AddDelay(ATriggerProc: TTriggerEvent; AInterval: LongInt): Integer;

Finally start the timer.

function AddOneTime(ATriggerProc: TTriggerEvent; AInterval: LongInt): Integer;

Finally start the timer.

destructor Destroy;


procedure Remove(AHandle: Integer);


procedure RemoveAll;


procedure Restart(AHandle: Integer);


function AllocateHandle: Integer;

Finally start the timer.

function GetCount: Integer;

Look for the maximum and minimum indices that are in use.

function GetStarted(AHandle: Integer): Boolean;


procedure TimerTimer(Sender: TObject);


Properties

property Count : Integer


property LastHandle : Integer


property Started : Boolean


Events

Variables

FPoolTimerKey : TPoolTimer;


FLastHandle : Integer;


FPoolTimers : TPoolTimerCollection;


FTimer : TTimer;



Constructors


constructor Create;

********************************** TTimerPool **********************************


Functions


function Add(ATriggerProc: TTriggerEvent; AInterval: LongInt): Integer;


function AddDelay(ATriggerProc: TTriggerEvent; AInterval: LongInt): Integer;

Finally start the timer.


function AddOneTime(ATriggerProc: TTriggerEvent; AInterval: LongInt): Integer;

Finally start the timer.


destructor Destroy;


procedure Remove(AHandle: Integer);


procedure RemoveAll;


procedure Restart(AHandle: Integer);


function AllocateHandle: Integer;

Finally start the timer.


function GetCount: Integer;

Look for the maximum and minimum indices that are in use.


function GetStarted(AHandle: Integer): Boolean;


procedure TimerTimer(Sender: TObject);


Properties


property Count : Integer


property LastHandle : Integer


property Started : Boolean


Events


Variables


FPoolTimerKey : TPoolTimer;


FLastHandle : Integer;


FPoolTimers : TPoolTimerCollection;


FTimer : TTimer;