how to use PulseGenerator?

i have a floating point number representing the amount of time i want to hold a gate open for. the variable is reached by accumulating args.sampleTime over a certain duration. i’m trying to use PulseGenerator to generate a gate with that given duration, but it’s just holding the gate open indefinitely for some reason.

any ideas? if more context is needed i can happily provide it.

nevermind, i managed to figure it out on my own. i was doing something dumb.