SplitScript reference / setTickRate

setTickRate

Function

setTickRate<T>(hz: T) -> None where T: Numeric

Changes the autosplitter tick rate.

The value is a frequency in updates per second. SplitScript normally applies 120 Hz immediately after attaching, before onAttach, and 1 Hz during module startup and immediately after detaching, before onDetach. A top-level tickRate declaration changes those lifecycle-owned defaults.

This function instead changes the wait after the current update. Its rate persists until another call or the next attachment transition, when the corresponding declarative rate is reapplied. Use it only for a genuinely temporary dynamic adjustment.

Parameters

  • hz: The positive, finite number of requested updates per second.

Effects: writes runtime state

Runtime behavior: available everywhere; synchronous

Examples

Temporarily reduce polling during module discovery

setTickRate(30)
let assets = await process.module("assets.dll")
setTickRate(120)
print(`Assets loaded at {assets.address}`)