Sleep / Suspended / Wakeup Detection?

Just starting out? Need help? Post your questions and find answers here.
vwidmer
Enthusiast
Enthusiast
Posts: 282
Joined: Mon Jan 20, 2014 6:32 pm

Sleep / Suspended / Wakeup Detection?

Post by vwidmer »

Hoping for a linux solution right now but if there is some cross platform way would be nice so dont have to figure out later.

Anyone have any idea on how to detect when computer has gone to sleep or suspended and woke up again?

Thanks
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA