Click to Rate and Give Feedback
MSDN
MSDN Library
Visual Studio 2005
Mobility Warnings
 Do not use timers that prevent powe...
This page is specific to
Microsoft Visual Studio 2005/.NET Framework 2.0

Other versions are also available for the following:
Visual Studio Team System
Do not use timers that prevent power state changes

TypeName

DoNotUseTimersThatPreventPowerStateChanges

CheckId

CA1601

Category

Microsoft.Mobility

Breaking Change

Breaking

A timer has an interval set to occur more than once per second.

Do not poll more often than once per second or use timers that occur more frequently than once per second. Higher frequency periodic activity will keep the CPU busy and interfere with power-saving idle timers that turn off the display and hard disks.

Set timer intervals to occur less than once per second.

This rule should be excluded only if firing the timer more than once per second is required and mobility considerations can safely be ignored.

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
I don't see the point of this rule      somos   |   Edit   |  

If you set a Timer with a rate of 100msec that does nothing the CPU usage will be much lower than setting a Timer with a rate of 10sec that does a task that needs 9,90 seconds to execute.

In the same way a Timer maybe is only started a small amount of time and there is no problem then to have it with a rate of 1 msec.

Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2008 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker