clearTimeout
Start from API_LEVEL
2.0. Please refer to API_LEVEL.
Cancel the timer registered by setTimeout.
Type
function clearTimeout(timeoutID: TimeoutID): void
Parameters
TimeoutID
| Type | Description |
|---|---|
number | Timer number |
Example
const timeoutID = setTimeout(() => {
console.log('Hello Zepp OS')
}, 1000)
clearTimeout(timeoutID)