GNOME Bugzilla – Bug 582703
Please consider using g_timeout_add_seconds to reduce wakeups
Last modified: 2010-10-13 18:08:50 UTC
From http://live.gnome.org/GnomeGoals/UseTimeoutAddSeconds, (and of course according to the gtk docs) using g_timeout_add_seconds is preferred over g_timeout_add if a timeout in seconds is desired.
Created attachment 134677 [details] [review] Use g_timeout_add_seconds instead g_timeout_add
I admit I have not read the surrounding code, but "show-dialog" sounds definitely like a case where add_seconds shpuld not be used: 1) it's UI related so I think it is nicer if the dialog pops up 5 seconds later consistently, not one time 4 seconds later the next 6 seconds later 2) these dialogs are proably shown when changing settings, which I'd say happens something line once a year, so you are not really saving any power :)
Hi paolo, so should the bug be closed as WONTFIX?
Changed those 2 instances, which we the only ones that made sense reading the code. commit 5e85aa9cdf6624effea5a890a2516f11d25a8bf3 Author: Bastien Nocera <hadess@hadess.net> Date: Wed Oct 13 19:07:36 2010 +0100 smartcard: Use g_timeout_add_seconds() Instead of g_timeout_add() as 2 seconds is coarse enough for us. https://bugzilla.gnome.org/show_bug.cgi?id=582703 commit 61c8ca9ad8add09830e72d0c10b97f59e80dd0f5 Author: Bastien Nocera <hadess@hadess.net> Date: Wed Oct 13 19:06:58 2010 +0100 daemon: Use g_timeout_add_seconds Rather than g_timeout_add() as we're looking for 1/2 minute timeouts here. https://bugzilla.gnome.org/show_bug.cgi?id=582703