Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This function resets a system timer that controls whether or not the device will automatically go into a suspended state.

Syntax

void WINAPI SystemIdleTimerReset(void); 

Parameters

None.

Return Value

None.

Remarks

When a device has run for a specified period of time, by default it goes into a suspended state. The system timer that controls this functionality uses a time interval specified in the registry. This interval is dependant on whether the device is on AC or battery power.

You can override the system timer by calling the SystemIdleTimerResetfunction more frequently than the values in the registry. Use the smaller of the two registry values.

The following registry key returns the time interval if the device is on AC power:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\Timeouts\ACSuspendTimeout

The following registry key returns the time interval if the device is on battery power:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Power\Timeouts\BatterySuspendTimeout

If the Power Manager is managing timeouts, calls to SystemIdleTimerResetwill still reset the GWES timeout and cause the screen saver to stop showing.

Note:
This function must be use appropriately. On battery-powered devices, a program that never suspends (or sleeps) by continually calling SystemIdleTimerResetcan quickly drain the batteries.

Requirements

Header winuser.h
Windows Embedded CE Windows CE 2.0 and later
Windows Mobile Windows Mobile Version 5.0 and later

See Also