View Single Post
Posts: 133 | Thanked: 172 times | Joined on Jul 2009 @ Travel bag
#1
gtk seems to be providing two timeout functions: gtk_timeout_add and gtk_timeout_add_seconds. The later is being suggested in various forums as in here and here, since it groups the program 'wake-ups' to reduce the frequency as against _timeout_add. The benefit is that, using _timeout_add_seconds reduces the number of program wake-ups and saves battery power..

If this is true, I wanted to use :
Code:
gobject.timeout_add_seconds(1, self.update)
as against
Code:
gobject.timeout_add(1000, self.update)
However when I use "gobject.timeout_add_seconds", in a desktop widget context for diablo, I get this error msg
AttributeError: 'module' object has no attribute 'timeout_add_seconds'
Any pointers on how I can use timeout_add_seconds to save power on the device.

TiA
Shin