use native timer when not web platform to avoid timer paused by system when app come into background
npm install native-timer
npx cap sync
setTimeout(d: { delay: number; id: number; }) => Promise<any>
Param | Type |
---|---|
d |
{ delay: number; id: number; } |
Returns: Promise<any>
clearTimer(d: { id: number; }) => Promise<any>
Param | Type |
---|---|
d |
{ id: number; } |
Returns: Promise<any>