ElectronPowerMonitor.getSystemIdleState method
ElectronPowerMonitor › getSystemIdleState
Unofficial
Calculate the system idle state.idleThreshold is the amount of time (in seconds) before considered idle. locked is available on supported systems only. Signature:
getSystemIdleState(idleThreshold: number): 'active' | 'idle' | 'locked' | 'unknown'Parameters:
| Parameter | Type | Description |
|---|---|---|
| idleThreshold | number | The amount of time (in seconds) before the system is considered idle. |
Returns: 'active' | 'idle' | 'locked' | 'unknown' — The system's current state.