_.now
Seconds Since Epoch, Not Milliseconds
- obj
- *
_.now is the simplest node in the underscore family: a timestamp. Wire it into your graph and it hands you the current time. There are no widgets to fiddle with and no settings to get wrong - which is exactly why it's worth knowing about, and why it's a good place to start if you're new to how this pack's nodes behave.
What it returns
It calls Python's time.time() and returns the result as a float: seconds since the Unix epoch (January 1, 1970 UTC). The value looks like 1786878424.86.
Here's the gotcha for anyone coming from JavaScript: underscore.js's _.now returns milliseconds since epoch. This Python port returns seconds. So if you were planning to feed it into something that expects JS-style milliseconds, you're off by a factor of a thousand - an easy mistake to make and a subtle one to catch later.
The only input is the standard obj slot, and its sole real job is accepting a _.CHAIN if you're mid-pipeline. Otherwise you can leave it unplugged and just read the output.
What you'd use it for
The classic use is timestamping filenames. Pair _.now with the pack's Python String Format node (or any string-builder) to make an output name like render_1786878424.png - though you'll want to format the float first, because a raw epoch value is a lot of digits with a decimal in the middle. {arg0:.0f} in the format string gets you the integer seconds.
The other use is timing: take _.now before a slow section, take it again after, and subtract. The pack even ships a dedicated Timer node if you want per-node timing, but a manual start/stop with two _.now calls is dead simple and works anywhere.
What it is not
It is not a random source and not seedable - it's a wall clock. If you want a reproducible per-run value to label outputs, use your workflow's seed or a counter instead, because every evaluation of _.now returns a different number and no two runs will match. That's fine for unique filenames and terrible for anything you want to re-run identically.
Installing
Part of the comfy-ovum pack by sfinktah. ComfyUI Manager → search comfy-ovum → Install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/sfinktah/comfy-ovum
Restart ComfyUI. No models, no extra pip packages for the underscore nodes - the port ships in the repo, and the pack's heavier requirements belong to its other nodes.
The bottom line
A one-input, zero-config clock. Just remember it's seconds, not milliseconds - and if you're stamping filenames, format the float first.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| objopt | * | Primary input object. Also accepts _.CHAIN to continue chaining. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |