Path: blob/main/files/en-us/mozilla/add-ons/webextensions/api/idle/setdetectioninterval/index.md
6556 views
------{{AddonSidebar()}}
Sets the interval, in seconds, used to determine when the system is in an idle state for {{WebExtAPIRef("idle.onStateChanged")}} events. The default interval is 60 seconds.
The detection interval is specific to the extension that calls the method. Changing the interval in one extension will not affect the detection interval in another extension.
Syntax
Parameters
intervalInSeconds:
integer. Threshold, in seconds, used to determine when the system is in an idle state. The minimum value you can supply here is 15.
Browser compatibility
{{Compat}}
Examples
{{WebExtExamples}}
Note: This API is based on Chromium's
chrome.idleAPI. This documentation is derived fromidle.jsonin the Chromium code.