Normal
Hello fred, nice work.Are You using this coding http://msdn.microsoft.com/library/default.asp?url=/library/en-us/power/base/system_wake_up_events.asp ??Here is a click from the MS site:When the system wakes automatically because of an event (other than power switch or user activity), the system automatically sets its idle timer to at least 1 minute. This timer allows applications to call the SetThreadExecutionState function to indicate that they are busy. This enables the system to shut down without affecting the user. The following criteria determine whether a system shutdown is needed:If the system wakes automatically, it shuts down as soon as the last job is completed, as indicated by the process calling SetThreadExecutionState.If the system wakes automatically, but the user provides new input while the event is handled, the system does not shut down when the last job finishes.If the system is on and the user is active, the system does not enter the sleeping state.If the system is on, no applications are busy, and the user is inactive for a long time, the system enters the sleeping state when the timer expires.SetThreadExecutionStateThe SetThreadExecutionState function enables applications to inform the system that it is in use, thereby preventing the system from entering the sleeping power state or turning off the display while the application is running.EXECUTION_STATE SetThreadExecutionState( EXECUTION_STATE esFlags);ParametersesFlags[in] Thread's execution requirements. This parameter can be one or more of the following values. Flag MeaningES_CONTINUOUS0x80000000 Informs the system that the state being set should remain in effect until the next call that uses ES_CONTINUOUS and one of the other state flags is cleared.ES_DISPLAY_REQUIRED0x00000002 Forces the display to be on by resetting the display idle timer.ES_SYSTEM_REQUIRED0x00000001 Forces the system to be in the working state by resetting the system idle timer.END clip:So it should only to be to call SetThreadExecutionState once directly after wake up and once when its ready. If no user inputs from wake up it should go to sleep again....So You shouldn't need any own timer...regards /gabbe[/url]
Hello fred, nice work.
Are You using this coding http://msdn.microsoft.com/library/default.asp?url=/library/en-us/power/base/system_wake_up_events.asp ??
Here is a click from the MS site:
When the system wakes automatically because of an event (other than power switch or user activity), the system automatically sets its idle timer to at least 1 minute. This timer allows applications to call the SetThreadExecutionState function to indicate that they are busy. This enables the system to shut down without affecting the user. The following criteria determine whether a system shutdown is needed:
If the system wakes automatically, it shuts down as soon as the last job is completed, as indicated by the process calling SetThreadExecutionState.
If the system wakes automatically, but the user provides new input while the event is handled, the system does not shut down when the last job finishes.
If the system is on and the user is active, the system does not enter the sleeping state.
If the system is on, no applications are busy, and the user is inactive for a long time, the system enters the sleeping state when the timer expires.
SetThreadExecutionState
The SetThreadExecutionState function enables applications to inform the system that it is in use, thereby preventing the system from entering the sleeping power state or turning off the display while the application is running.
EXECUTION_STATE SetThreadExecutionState(
EXECUTION_STATE esFlags
);
Parameters
esFlags
[in] Thread's execution requirements. This parameter can be one or more of the following values. Flag Meaning
ES_CONTINUOUS
0x80000000 Informs the system that the state being set should remain in effect until the next call that uses ES_CONTINUOUS and one of the other state flags is cleared.
ES_DISPLAY_REQUIRED
0x00000002 Forces the display to be on by resetting the display idle timer.
ES_SYSTEM_REQUIRED
0x00000001 Forces the system to be in the working state by resetting the system idle timer.
END clip:
So it should only to be to call SetThreadExecutionState once directly after wake up and once when its ready. If no user inputs from wake up it should go to sleep again....
So You shouldn't need any own timer...
regards /gabbe[/url]