TTimer

Navigation:  Les scripts > Les autres scripts > Procedure and function > Specifics > Objects >

TTimer

Previous pageReturn to chapter overviewNext page

Create a countdown timer.

 

Ttimer.TimerCreate;

 

Constructor TimerCreate(T:Integer);

 

Create a timer with the setup value of T in milisecond.

 

 

Ttimer.TimerFinish;

 

Function TimerFinish:Boolean;

 

Return True if the timer has finish counting down to 0.

 

Exemple:

 

T:=Timercreate(5000);

Repeat

 if T.Timerfinish then

begin

 bit(10,0,1,true);

 T.Timerrestart;

End;

Until fin

T.free;

 

Ttimer.TimerResart;

 

Procedure TimerRestart;

 

Restart the timer with the predefined timer value.

 

Ttimer.TimerValue;

 

Function TimerValue:Integer;

 

Return the value of the actual countdown timer.

 

Ttimer.TimerPreset;

 

Procedure TimerPreset(T:integer);

 

Preset a new value to the countdown timer.