Home > SYS_Timer > setIntervalTimer
SYS_Timer.setIntervalTimer() method
Set an interval timer
Signature
typescript
function setIntervalTimer(
id: string,
timeout: number,
callFn: (...args: any) => void,
...args: any
): boolean;1
2
3
4
5
6
2
3
4
5
6
Parameters
Parameter | Type | Description |
|---|---|---|
id | string | Timer ID, used to locate and delete the timer |
timeout | number | Timer duration, unit ms |
callFn | (...args: any) => void | Function called by the timer |
args | any | Arguments passed to the timer callback function |
Returns
boolean
Whether the timer was set successfully
Remarks
If a timer with a duplicate ID is encountered, the previously set timer will be cleared