time
Arc standard library reference for the time module: now, interval, and wait
The time module provides timing functions for timestamps, periodic firing, and delays.
interval
Fires repeatedly at a fixed period, emitting 1 on each tick. Common for driving
control loops, periodic sampling, and generating test data.
Parameters
Output u8: emits 1 on each fire.
// `flow` only
time.interval{period=1s} -> tick now
Returns the current timestamp. time.now works both as a flow node and as a direct
function call, so it can be wired into a chain or called inside a func.
Parameters
Output i64 ns: the current timestamp.
trigger -> time.now{} -> current_time
func stamp() {
current_time = time.now()
} wait
Fires once after a fixed duration, then stops.
Parameters
Output u8: emits 1 once the duration elapses.
// `flow` only
time.wait{duration=500ms} -> done