useOnTicks
u--- hide_table_of_contents: true
Executes a callback every specified number of ticks.
Syntax
useOnTicks(callback, ticks);
Paramters
Name | Type | Description |
---|---|---|
callback | function | The callback to execute. |
ticks | number | The number of ticks to wait before executing the callback. |
Example
useOnTicks(() => {
console.log("I'm executing every second!");
}, 1);
Available on: Client Server