Pocket PC Power Management Series 1: the Challenge to Developers
====>SiteMap of this Blog<===
Pocket PC Power Management Series 1: the Challenge to Developers
If you own a Pocket PC, you may notice that its screen frequently turns off, if the device is not used for certain time. The time can be adjusted via “Start => Settings => System =>
To turn off the screen is a good thing to the battery life, as the LCD display often turns out to the big battery sucker, especially if backlight is configured to be very bright. However, for some reason, Microsoft deemed that to turn off the CPU might save even more battery. So here comes a unique power model in Pocket PC: The system is also suspended after the device is not used for certain time. Or we say the system is sleeping, in sleep mode.
When the devie is sleeping, THE THREADS SIMPLY DO NOT RUN! Period.
Compared to a desktop machine, if the machine is not used for certain time, a screen saver may be started, or the power management system may kick in and turn off the screen. Whatever, the CPU is still spinning; any of your threads can still run as usual.
Such unique power model in Pocket PC presents unique challenge to developing programs that need to run for a long time uninterrupted (or need to run even if the system is suspended). I’ll come up with a few blog posts soon on how to write such a program, mainly:
- General principles
- Force the device to run?
- Request the device to run?
- GetTickCount vs GetLocalTime
- Older notification functions
- Newer notification functions
Category: [Power Management]