wait(second)

koadrobot/progress/wait(second)

If SET, Delay seconds and DONE.
wait(second)
@/wait(second)
If SET, Delay seconds and DONE.
Tsecnumber
Time to delay in seconds
SETpulse
Resets current countdown, starts new countdown
wait(second)
Tsec
SET
DONE
DONEpulse
Pulses once the delay is over
To use the node in your project you should have the koadrobot/progress library installed. Use the “File → Add Library” menu item in XOD IDE if you don’t have it yet. See Using libraries for more info.

C++ implementation

#pragma XOD dirtieness disable

struct State {
};

{{ GENERATED_CODE }}

void evaluate(Context ctx)
{
   if (isInputDirty<input_SET>(ctx))
   {
        TimeMs dt = getValue<input_Tsec>(ctx) * 1000;
        delay(dt);
        emitValue<output_DONE>(ctx, true);
    }
}

Tabular tests

__time(ms)TSETRSTDONEACT
00.5no-pulseno-pulseno-pulsefalse
10000.5pulseno-pulseno-pulsetrue
15000.5no-pulseno-pulseno-pulsetrue
15010.5no-pulseno-pulsepulsefalse
20000.5pulsepulseno-pulsefalse
25000.5pulseno-pulseno-pulsetrue
26002no-pulseno-pulseno-pulsetrue
27002no-pulsepulseno-pulsefalse
30012no-pulseno-pulseno-pulsefalse