delayedCallMs — delayed function call in milliseconds.

Description:

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

Delayed func function call in time milliseconds.

List of parameters:

func

Pointer to the function.

time

Time in milliseconds. Milliseconds can be specified only in multiples of 50. Max number of milliseconds which is possible to specify is 10000 units.

Example:

<import-script id="524" LAMP="524:19" name="Test for delayedCallMs function">

void offLamp() 
{
	setStatus(LAMP, 0);
}

V-ID/LAMP 
{
	if(opt0())
		delayedCallMs(offLamp, 500);
	
}

</import-script>

The result of performing this example:

On expiry of 500 milliseconds after switching on the element LAMP will be turned off.

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.