nTime | (Long) Time period (interval or timeout) in milliseconds after which the function is called. |
---|---|
nType | (Long) Inner timer request type. -1 - The function will be called repeatedly with defined period (interval). 1 - The function will be called once with defined delay (timeout). |
Func | (Function) JavaScript event function that will be called by application timer. |
function OnTick()
{
Pm.Debug("OnTick: tClick=" + Pm.FormatDate(tClicked, 1) + "nCounter = " + nCounter);
if (nCounter-- > 0)
pMe.Root.AddEventTimer(1000, 1, OnTick);
}
var tClicked = Pm.Time;
var nCounter = 10;
pMe.Root.AddEventTimer(1000, 1, OnTick);
function OnTick()
{
Pm.Debug("OnTick: tClick=" + Pm.FormatDate(tClicked, 1) + "nCounter = " + nCounter);
if (nCounter-- < 0)
pMe.Root.RemoveEventTimer(OnTick);
}
var tClicked = Pm.Time;
var nCounter = 10;
pMe.Root.AddEventTimer(60, -1, OnTick);