function setInterval

Supported only in the v8 engine. Introduced in Max v9.2.0.

Schedules a callback to run repeatedly at a fixed interval.

Intervals use Max queue coalescing: if an interval fires faster than its callback can be serviced, pending callbacks are coalesced rather than backlogged indefinitely.

export declare function setInterval(
  callback: (...args: any[]) => void,
  delay?: number,
  ...args: any[]
): number;
NameTypeDescription
callback(...args: any[]) => voidthe function to run on each interval
optional delaynumberinterval in milliseconds between callbacks (default 0)
argsany[]additional arguments forwarded to the callback
Return Valuenumbera numeric timer ID for use with clearInterval()