cancelDelayedCall — cancellation of delayed function call.

Description:

void cancelDelayedCall(void *func);

Cancel the delayed func function call.

List of parameters:

func

Pointer to the function.

Example:

<import-script LAMP="512:8" id="524" name="Test for delayedCallM function">
u8 countOfBlink = 0;
u8 countOfBlink = 0;
void lampBlink() 
{
	setStatus(LAMP, ![LAMP]);
	++countOfBlink;
	
	if(countOfBlink > 4) 
	{
		cancelDelayedCall(lampBlink);
		countOfBlink = 0;
	}
}

V-ID/LAMP 
{
	if(opt0() && countOfBlink == 0) 
	{
		delayedCallR(lampBlink, 2);
	}
}
</import-script>

The result of performing this example:

After activating the element LAMP the delayed function call delayedCallR will run which in return will start lampBlink function every two seconds. The element will be activated and disactivated twice whereafter cancelDelayedCall function that will stop lampBlink function call will run.

Note:

CancelDelayedCall function cancels all the delayed calls of the same function.