Description:
Causes the system to enter a low-power state. This function is similar to the `Sleep()` function, but it allows the system to enter a low-power state instead of simply pausing execution. It is often used in conjunction with the `WakeLock` class to prevent the system from resuming when the device is idle.
Prototype:
<HINSTANCE> SleepEx(DWORD dwMilliseconds);
Parameters:
dwMilliseconds
: A non-negative value specifying the number of milliseconds to sleep for. If this value is 0, the function returns immediately without waiting.Return Value:
Returns TRUE
if the function succeeds, or FALSE
if a problem occurs.
Example:
<BOOL> result = SleepEx(1000); // Sleep for 1 second>
Related APIs: