StartEx - method of the PmaTimer object
Description:
Timer activation with the specified number of runs and the period.
Syntax:
Empty StartEx(Single fPeriod, Long nCounter)
Parameters:
fPeriod | (Single) New timer period in seconds or flag to use current timer period.
fPeriod > 0 - The value greater than 0 means the new value of timer period in seconds. The value of the parameter is moved into the Period property.
fPeriod = -1 - Timer period keeps unchanged. The Period property is not changed. |
nCounter | (Long) The number of timer runs. The value of the parameter is moved into the Counter property.
nCounter > 0 - The value greater than 0 means the number of next timer runs. Each timer run automatically decreases the value of the Counter by 1.
nCounter = 0 - The timer will not be started
nCounter = -1 - The number of timer runs is unlimited |
---|
Note:
Calling this method is identical with setting:
Enabled to the
true value,
Period to the value of the
fPeriod parameter and
Counter to the value of the
nCounter parameter.
After running the specified number of runs, the timer stops and
Enabled is
false,
Period remains unchanged on the value of the
fPeriod parameter and
Counter is 0.
For more common time control it is better to use the
PmaSequencer object.
Example:
The
onTick event will be triggered 10 times with
3 seconds delay.
JavaScriptVBScriptSelect and copy to clipboard
var oTimer = pMe.Pm("/Timer");
oTimer.StartEx(3, 10);
Dim oTimer
Set oTimer = pMe.Pm("/Timer")
oTimer.StartEx 3, 10