Widgets/Logic

Delay Widget

Delay Widget

A "Logic" type widget. Delay Widget pauses the flow of data for a specified amount of time before forwarding events to the next widget. It supports concurrent processing, allowing multiple events to be delayed simultaneously, and provides control ports for managing pending delays.

 

Inputs

  • in (DataType: Anything) Any event arriving at this input will be held for the specified delay time before being forwarded to the output. Multiple events can be processed concurrently, each with its own delay timer.

  • abort (DataType: Anything) Any event arriving at this input will cancel ALL pending delay timers without forwarding any held events. This provides an emergency stop mechanism.

  • continue (DataType: Anything) Any event arriving at this input will immediately release ALL pending delays with their original data, bypassing the remaining delay time.


Outputs

  • out (DataType: Anything) Forwards the original event data after the specified delay time has elapsed, or immediately if triggered by the "continue" input. Each event maintains its original data and timing.

Custom Settings

  • interval — The delay time before forwarding events, specified in milliseconds by default. Click on ms to switch between milliseconds (ms), seconds (sec), and minutes (min) for the delay value.
    • range1ms to 24 hours (86,400,000ms)

Interval Mode Setting

 

Examples

Basic Delay

This example shows a basic delay that holds an event for 2 seconds before forwarding it to a Display Widget.


Drag the example onto the workspace to explore and experiment!



In this example

  1. The Button Widget triggers an event
  2. The Delay Widget holds the event for 2 seconds
  3. The Delay Widget shows "2 sec" configuration and processes events with the specified delay timing
  4. The Display Widget receives the event after the delay

 

Delay with Abort and Continue Controls

This example demonstrates how to use the Abort and Continue inputs to control the delay behavior.


Drag the example onto the workspace to explore and experiment!



In this example

  1. Start Delay - Triggers a 4-second delay
    • Note: Each button press creates a new delay event. If pressed multiple times during the 4-second period, all events accumulate in the queue
  2. Abort Delay - Cancels ALL pending delays without forwarding any events
    • Note: This immediately clears the entire queue, discarding all accumulated events
  3. Continue Immediately - Releases ALL pending delays immediately with their original data
    • Note: This bypasses the remaining delay time and processes all queued events at once
  4. Counter - Shows the result
    • Note: The counter increments for each event that reaches it, demonstrating event accumulation

 

Sequential Processing with Delay

This example demonstrates how the Delay Widget can be used to create timed sequences in data processing workflows.


Drag the example onto the workspace to explore and experiment!



In this example

  1. The Button Widget triggers the sequential processing
  2. The Text Widget contains an array of data items to be processed sequentially
  3. The Text to Object Widget converts the text string to an array object
  4. The Loop Widget iterates through each array item sequentially
  5. The Delay Widget adds a delay between each iteration, creating a timed sequence
  6. The Text Widget displays the final processed item after all delays complete

 

📌 Additional Notes

  • Event data preservation: Each delayed event maintains its original data structure and type, ensuring no data loss during the delay period
  • Memory management: Pending delays are automatically cleaned up when the widget is terminated or removed, preventing memory leaks
  • Error handling: Invalid interval values throw descriptive errors with specific bounds information (1ms to 86,400,000ms)

 

Glossary

  • concurrent processing

    The ability to handle multiple events simultaneously, each with its own independent processing timeline