diff options
author | Daniel Drake <dsd@laptop.org> | 2008-12-06 21:42:19 (GMT) |
---|---|---|
committer | Daniel Drake <dsd@laptop.org> | 2008-12-06 21:48:51 (GMT) |
commit | 958504b1ca5760ec263e72f69787e9cd5afc7118 (patch) | |
tree | d841902df962a71bb74a30ad0f382801b8cae93f /src/jarabe/journal/listview.py | |
parent | 8c8b205fdf23accfaade79b9162812d5c59b30a9 (diff) |
Use g_timeout_add_seconds() for power efficiency
This attempts to align second-granularity wakeups across the system,
reducing CPU wakeups a little.
I considered all timeouts of duration 1 second or greater, and moved
the non-timing-critical ones to g_timeout_add_seconds().
Diffstat (limited to 'src/jarabe/journal/listview.py')
-rw-r--r-- | src/jarabe/journal/listview.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/jarabe/journal/listview.py b/src/jarabe/journal/listview.py index a34184a..1f3281f 100644 --- a/src/jarabe/journal/listview.py +++ b/src/jarabe/journal/listview.py @@ -34,7 +34,7 @@ DS_DBUS_SERVICE = 'org.laptop.sugar.DataStore' DS_DBUS_INTERFACE = 'org.laptop.sugar.DataStore' DS_DBUS_PATH = '/org/laptop/sugar/DataStore' -UPDATE_INTERVAL = 300000 +UPDATE_INTERVAL = 300 EMPTY_JOURNAL = _("Your Journal is empty") NO_MATCH = _("No matching entries ") @@ -424,7 +424,7 @@ class BaseListView(gtk.HBox): if self._update_dates_timer is None: logging.debug('Adding date updating timer') self._update_dates_timer = \ - gobject.timeout_add(UPDATE_INTERVAL, + gobject.timeout_add_seconds(UPDATE_INTERVAL, self.__update_dates_timer_cb) else: self._fully_obscured = True |