ms() — number of milliseconds from module being started (resets to zero after u32 counter overflow).

Description:

u32 ms();

Returns number of milliseconds from unit being started (resets to zero after u32 counter overflow)

Returns number of milliseconds from unit being started (resets to zero after u32 counter overflow).

Return values:

Returns number of milliseconds from unit being started (resets to zero after u32 counter overflow). Type of return value u32.

Example:

<item addr="524:248" INTERFACEID="2023" name="Test for ms function " type="script">

V-ID/s:1 
{
	u32 msec = ms();

	// output
	u8 strForMess[100];
	sprintf(strForMess, "%cMilliseconds since the start of unit: %d", 1, msec);
	setStatus(INTERFACEID:32, &strForMess);
}

</item>

The result of performing the example in the interface:

Every second the messages with current value of milliseconds passed from unit being started appear in the interface.