Home > SYS_Timer > setTimeoutTimer
SYS_Timer.setTimeoutTimer() method
Set a timeout timer
Signature
typescript
function setTimeoutTimer(
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 |
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