Skip to content

snowwolfjay/capacitor-timer

Repository files navigation

native-timer

use native timer when not web platform to avoid timer paused by system when app come into background

Install

npm install native-timer
npx cap sync

API

setTimeout(...)

setTimeout(d: { delay: number; id: number; }) => Promise<any>
Param Type
d { delay: number; id: number; }

Returns: Promise<any>


clearTimer(...)

clearTimer(d: { id: number; }) => Promise<any>
Param Type
d { id: number; }

Returns: Promise<any>


About

Let timer works when app enter background or screen lock and the webview shutdown timer and network

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors