chipKIT® Development Platform

Inspired by Arduino™

Last edit: 2021-03-21 22:34 by Majenko

Delay

  1. Synopsis

  2. Description

  3. Return Value

  4. Caveats

  5. Conforming To

  6. Examples

  7. See Also

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()