Skip to main content

Delay

This node delays a signal by a specified amount of time.

The Delay node pauses the flow of execution for a set duration.

The Delay node is a simple timer that waits for a specific number of milliseconds after receiving an input signal before emitting an output signal.

Inputs

General

DataDescription
DelayThe wait time in milliseconds. Default: 1000.

Actions

SignalDescription
InThe signal to delay.
CancelCancels any pending delay.

Outputs

Events

SignalDescription
OutTriggered after the delay time has passed.

Usage

Debouncing

(Note: For true debouncing, specialized nodes are better, but Delay can simulate it).

  1. User types a character.
  2. Trigger Cancel (to stop previous timer) then In.
  3. After 500ms of no typing, Out triggers "Search".

Sequence

  1. Show "Success" message.
  2. Trigger Delay (2000ms).
  3. On Out, hide the message.

Detailed Behavior

  • Multiple Triggers: If In is triggered multiple times, it creates multiple independent timers (unless canceled).
  • Cancellation: Cancel stops all pending timers for this node.

Troubleshooting

  • Timing: Delays are not guaranteed to be exact to the millisecond due to JavaScript's event loop, but are generally accurate enough for UI logic.