createTimer


createTimer (interval, function-to-call, parameters)

Creates a timer that executes function-to-call after interval milliseconds with parameters.

Parameters:

interval

An integer containing the time interval in milliseconds.

function-to-call

A string containing the function to call.

parameters

A variable number of parameters that are passed to the timer function.

Returns:

Returns a variable containing the timer id. This may be passed to cancelTimer.

Example:

The following code shows how to create a timer that is fired in 30 seconds.

id = createTimer(30000, "escalate", message)

The timer function escalate is an example of how to change the color of a message.

Example:

function escalate(msg)

select

when msg.COLOR == GREEN then

msg.COLOR = YELLOW

when msg.COLOR == YELLOW then

msg.COLOR = WHITE

when msg.COLOR == WHITE then

msg.COLOR = RED

end

return 0

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

BMC AMI Ops Console Management, BMC AMI Ops Console Automation, and BMC AMI Ops SecureHMC 4.1