Created attachment 2267
Use g_timeout_add_seconds() when glib version >= 2.14
Cpufreq panel plugin is often used on laptops. It currently uses g_timeout_add() for the timers controlling how often we read the current frequency.
From glib documentation on g_timeout_add (); If you want to have a
timer in the "seconds" range and do not care about the exact time of
the first call of the timer, use the g_timeout_add_seconds() function;
this function allows for more optimizations and more efficient system
Now this plugin is used on laptops and as a user I do want to see the current frequency, but not with the cost of worse battery life. So added a patch that uses g_timeout_add_seconds().
Pros: better battery life
Drawback: lower update interval
Patch based on http://trac.transmissionbt.com/changeset/7463
More on powersaving and timers: http://mjg59.livejournal.com/74651.html?thread=452251
Created attachment 2268
Update patch with check of data from config file
The code has changed since the patch was submitted, so it doesn't apply, but I made similar changes.