Object.cancelTimeOut Method

Cancels a previous method call to the setTimeOut method.

Syntax

public void cancelTimeOut(int timerHandle)

Run On

Called

Parameters

  • timerHandle
    Type: int
    The handle of the scheduled event to delete. The handle is the value that is returned by the Object.setTimeOut method.

Remarks

Any scheduled time-out calls that have not yet been processed are automatically deleted when the object itself is deleted.

Examples

The following example calls the Object.setTimeOut method, and then cancels the time-out.

void Object_cancelTimeOut(Args _args) 
{ 
    int th; // timerHandle. 
 
    // timedMethod is a worker method. 
    th = this.setTimeOut( "timedMethod", 2000 ); 
    //.... 
    // Remove timeOut later. 
    CancelTimeOut(th); 
}

See Also

Object Class

Object.setTimeOut Method