sec2hm

xoduser123/myfuncs/sec2hm

No description
sec2hm
@/sec2hm
SEC_INnumber
sec2hm
SEC_IN
MIN
SEC
SECnumber
MINnumber
To use the node in your project you should have the xoduser123/myfuncs 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 {
    meta {
        using Type = Number;
    }

    void evaluate(Context ctx) {
        int sec = getValue<input_SEC_IN>(ctx);

        // Use the `Type` type to define a new variable that will be
        // later output as the result. We use `fmod` to perform day-wrap
        // and be sure the value is in valid range
        Number min_out = sec / 60;
        Number sec_out = sec % 60;

        // Then we can output the new type value like a regular one
        emitValue<output_MIN>(ctx, min_out);
        emitValue<output_SEC>(ctx, sec_out);
    }
}