Delay
Block Group: | Logic |
Icon: |
Accepts an input value, waits a predetermined amount of time, and then returns the input as output.
For information on using dataflow blocks, see Dataflow.
Input/Output Properties
These properties can take input and give output.
- input
- delay (number)
- interruptMode (enum or string)
input holds the value to deliver after a delay.
delay sets the length of the delay, in seconds.
mode specifies the behavior of this block in cases where input changes during a delay.
- delay: Every change to input is sent to output n seconds after it occurs.
- window: Only the last change from each delay window is sent to output. A change to input starts the timer if it is not already running. If another change happens while the timer is running, it does not reset. Only the latest value is sent when the timer ends.
- wait: The latest value of input is sent to output only after a lack of updates lasting the length of the delay timer. Each input restarts the delay timer. Changes are sent only when the timer finishes.
Output Properties
These properties can give output. They cannot take input.
- output
output returns the input value after the delay.