delta-micros-copy

hio/nwt-gus-hi/delta-micros-copy

Outputs time difference in microseconds between the current and previous updates.
delta-micros-copy
@/delta-micros-copy
Outputs time difference in microseconds between the current and previous updates.
INxod/core/micros
Time in microseconds
UPDpulse
Triggers new update
delta-micros-copy
IN
OUT
UPD
OUTxod/core/micros
Delta time in microseconds
To use the node in your project you should have the hio/nwt-gus-hi 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

node {
    typeof_IN lastMicros = 0;

    void evaluate(Context ctx) {
        if (!isInputDirty<input_UPD>(ctx)) return;

        typeof_IN newLast = getValue<input_IN>(ctx);
        emitValue<output_OUT>(ctx, newLast - lastMicros);
        lastMicros = newLast;
    }
}