GNOME Bugzilla – Bug 692622
Use g_timeout_add_seconds instead of g_timeout_add
Last modified: 2015-12-21 21:17:19 UTC
See https://live.gnome.org/GnomeGoals/UseTimeoutAddSeconds
Created attachment 234515 [details] [review] Reduce no. of wakeups to save power Use g_timeout_add_seconds instead of g_timeout_add where possible.
Thanks for the patch. But looking at the comments on the page you cite, I see the following: In particular the candidates for being replaced are timeouts called in a recurrent manner (eg polling) and that do not need an accurate timeout. Timeouts that are fired just once or that result in something visible to the user should usually not be changed. Orca's timeout is not called in a recurrent manner. It is fired just once. It does result in something "visible" to the user (namely the presentation of a message). And the timeout should be accurate. So I think in Orca's case this change is not wanted. As for power saving, the only time that timeout will get called is if: 1. The user is binding or rebinding an Orca command, and 2. The user selected a keybinding that is already bound to another command.