Delay

From chipKIT
Jump to: navigation, search

Synopsis

 void delay(unsigned long ms)

Description

delay() pauses your program for ms milliseconds.

Return Value

None

Caveats

The delay() function is completely blocking. Nothing else can happen while delay() is running other than interrupts. Its use is discouraged for anything but short delays for timing purposes. Instead the use of millis() is encouraged to create non-blocking code.

Conforming To

delay() conforms to the Arduino 1.6.x API.

Examples

Wait for 1 second:

 delay(1000);

See Also

delayMicroseconds(), micros(), millis()