rangesranges
Arc standard library reference for the ranges module: create and end
The ranges module creates and closes ranges on the Core, letting a program mark
regions of time as an automation runs.
create
Creates a range that starts now and stays open. Its end is set to the maximum timestamp, shown as “In progress”. Outputs the new range key.
ranges.create{name: str, parent?: str, color?: str} -> strParameters
name: A human-readable name for the range.parent: The key of an existing range to nest under. No parent if omitted.color: A display color: hex (#3bc454),rgb(r, g, b), orrgba(r, g, b, a).
Output
The new range key.
Flow
Func
sequence ranges_create {
ranges.create{name="Terminal Count", color="#3bc454"} -> range_key
}func ranges_create() {
range_key := ranges.create("Terminal Count", "", "#3bc454")
}end
Sets the end bound of an existing range to now, closing an open range, and outputs the range key.
ranges.end{key: str} -> strParameters
key: The key of the range to close.
Output
The range key that was closed.
Flow
Func
sequence ranges_end {
trigger -> ranges.end{key=range_key}
}func ranges_end() {
ranges.end(range_key)
}