Nodes/Kinburg-Nodes/Stop Timer
ComfyUI Node

Stop Timer

The other half of the stopwatch, and the number that comes out

By Kinburg·Created 3 months ago·Updated 6 days ago· 1
Stop Timer
  • passthrough
  • passthrough
  • elapsed
  • seconds
start_seconds0.00
formatauto

Start Timer and Stop Timer are a pair: Start goes at the beginning of a workflow slice, Stop goes at the end, and Stop is the one that actually hands you a number. By itself it does nothing useful - its whole job is to receive the start timestamp, wait for the slice to finish, and subtract. But the formatting choices and the caching behavior are where the details live, so here's the full picture.

How it works

The stopwatch trick is a data dependency: any value flows through Start Timer untouched, then through your slice, then into Stop Timer's passthrough. ComfyUI's execution order guarantees Start runs, then everything downstream of it, then Stop. Start's start_seconds (epoch time as a float) travels along a separate wire into Stop's start_seconds input, and Stop computes now - start. Simple arithmetic, but the ordering is what makes it honest.

Both nodes return an always-dirty IS_CHANGED (NaN) so they re-execute every run - otherwise Start would hand back a stale timestamp and the engine might skip the slice entirely, giving you a "0.000 s" that means nothing. The cost is that the wrapped slice recomputes every run with no caching while the timers are active, so mute them when you're done measuring.

Inputs

  • passthrough - any value, passes through unchanged. Wiring it from the end of the slice is what stops the timer here.
  • start_seconds - connect Start Timer's start_seconds output. This is what you must not forget; the node defaults to 0, and if you leave it there you'll time from the epoch and get a hilarious number.
  • format - how the elapsed string reads. auto picks based on magnitude (ms for sub-second, mm:ss up to an hour, HH:MM:SS beyond), or you can force seconds, milliseconds, HH:MM:SS, or human ("1m 23s" style).

Outputs

  • passthrough - your value, unchanged, so the Stop node doesn't break the data flow it's sitting in.
  • elapsed - the formatted string. Wire it into any text preview (the pack's Show Text (Markdown) or a core preview) to actually see the timing result - it's an output node, so it doesn't render anything on its own.
  • seconds - the raw float, for when you want to feed the number somewhere programmatic: a log node, a comparison, a conditional.

Install

Same as its sibling - part of the Kinburg-Nodes pack via ComfyUI Manager (search "Kinburg-Nodes") or git clone https://github.com/Kinburg/Kinburg-Nodes into custom_nodes, then restart. No extra dependencies.

Where people get burned

Two mistakes dominate. First: forgetting to connect start_seconds, so you time from zero. Second: leaving the timers wired in permanently, not realizing they defeat caching for the whole slice and slow every run. Set up the pair, read your number, mute them. Also note Stop Timer is an output node - it'll show in the queue's node list, which is normal, not a bug.

CategoryKinburg-Nodes/util

Inputs (3)

NameTypeDefaultDescription
passthrough*Any value — it passes through unchanged. Wiring it from the end of the slice is what stops the timer here.
start_secondsFLOAT0.00Connect 'start_seconds' from the Start Timer node.
formatCOMBOautoHow to format the elapsed time string.

Outputs (3)

NameTypeDescription
passthrough*
elapsedSTRING
secondsFLOAT