Before testing this code make sure all important documents and applications on local computer are closed. This code suspends the system and wakes it up in about 30 seconds using the WaitableTimer object.
An application may use SetSuspendState to transition the system from the working state to the standby (sleep), or optionally, hibernate (S4) state. This function is similar to the SetSystemPowerState function. The calling process must have the SE_SHUTDOWN_NAME privilege.
To prevent the user from putting the computer in standby mode, the application must deny the PBT_APMQUERYSUSPEND event.
Credits: PHP (4.4.9), an HTML-embedded scripting language,
MySQL (5.1.55-log), the Open Source standard SQL database,
AceHTML Freeware
Version 4, freeware HTML Editor of choice. Hosted by Korax Online Inc.