delayedCallMR — delayed function call for each specified number of minutes.

Description:

void delayedCallMR(void *func, u16 time[,u32 data]);

Delayed func function call every time minutes.

List of parameters:

func

Pointer to the function.

time

Time in minutes (maximum 1024).

Example:

<item id="524" LAMP="524:19" name="est for delayedCallMR function" type="script">

void onOffLamp() 
{
	setStatus(LAMP, ![LAMP]);
}

V-ID/V-ADDR 
{
	if(opt0())
	{
		delayedCallMR(onOffLamp, 1);
	}
	
	if(!opt0())
	{	
		cancelDelayedCall(onOffLamp);
	}
}
</item>

The result of performing this example:

Every minute the element LAMP will change its status to the opposite one (if it is activated – it will be disactivated and vice a versa)

Note:

· Before the previous call is triggered the 2nd delayed call will be generated but not recorded over the previous one when assigning the delayed recall to one and the same function.

· Use cancelDelayedCall for suspending the delayed function call.