I’d like to get a callback when the computer wakes from sleep on Microsoft Windows. I see there are Windows APIs for this: and I’m a little familiar with calling c code but it’s talking about windows applications, services, etc. that I’m having a hard time translating. I think I would call RegisterPowerSettingNotification but my julia code doesn’t really own a window handle, nor is it a service, so… I’m not sure where to go from there.
I know I could create a workaround such as: create a timer that would wake up regularly and check if it the computer had been asleep by checking the last run time, but I’d prefer to get a notification from the OS if possible.