PreviousNext
waitMS
Help > OS functions > Timing > waitMS

Function

 

Wait the specified number of milliseconds

Purpose

 

Time delay generation

Syntax

 

void waitMS(uns8 ms)

Parameters

 

ms - time to wait in milliseconds (0 - 255)

Return value

 

  –

Output values

 

  –

Preconditions

 

This function can be combined with waitDelay, startCapture and captureTicks.

Remarks

 

•     This is an active waiting (on OS foreground). No other operation runs on OS foreground during waiting.

•     Time precision depends on the internal RC oscillator. Thus, the delay can vary with temperature, etc. See MCU datasheet.

Side effects

 

  –

See also

 

waitDelay, startDelay, startLongDelay

Example

 

waitMS(10);     // Delay 10 ms. Program stays here for the whole 10 ms period

   ...           // and continues here just after the period elapsed.