-
-
Notifications
You must be signed in to change notification settings - Fork 345
Description
Is your feature request related to a problem? Please describe.
I'd like to be able to tell when the system is "asleep".
On MacOS, for instance, when the laptop lid is closed, the system goes into sleep mode. In this mode, the system periodically wakes up for very brief amounts of time (100ms) -- during these periods, various system services (ie networking) are not reliably usable, but node apps do run.
I have a long-running node app that activates at these times, but I'd like to avoid processing when the system is in sleep mode.
I suspect windows/linux has similar concepts but I'm not certain.
Describe alternatives you've considered
I've considered building my own node addon for this, but having an NPM library with this makes it available to everyone.
Thank you for making this great library!