On 20 October 2011 09:55, Hiko <[email protected]> wrote:
> Hi,
>
> I implemented a widget to display a CPU occupancy.
> CPU occupancy is taken from "cpu" information in the "/proc/stat".
>
> I faced a problem.
> CPU occupancy is raised rapidly at the moment when this cpu occupancy
> widget is on the home screen.
>
> I have one question.
> Is CPU occupancy raised when a widget is on the screen?
>

You should only read the /proc/stat file and render the results then
wait for prolonged period of time (refresh rate say 5 seconds, or
possibly even longer) doing nothing.
Do you have an active loop, that checks for changes in this file?

Daniel





-- 
Daniel Drozdzewski

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to