From ba82c09a4fad2c258eee6198c2c460fce28afd7b Mon Sep 17 00:00:00 2001 From: Diego Escalante Urrelo Date: Wed, 3 Jan 2007 08:08:12 +0000 Subject: Utilize GLib's new g_timeout_add_seconds to reduce context switches and 2007-01-03 Diego Escalante Urrelo * embed/ephy-favicon-cache.c: (ephy_favicon_cache_init): * embed/ephy-history.c: (ephy_history_init): * lib/Makefile.am: * lib/ephy-glib-compat.h: * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_save_delayed): * src/ephy-dbus.c: (session_filter_func), (system_filter_func): * src/ephy-extensions-manager.c: (reload_cb): * src/ephy-session.c: (confirm_shutdown_cb): Utilize GLib's new g_timeout_add_seconds to reduce context switches and improve CPU/power efficiency. Patch by Chris Wilson. svn path=/trunk/; revision=6783 --- embed/ephy-history.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'embed/ephy-history.c') diff --git a/embed/ephy-history.c b/embed/ephy-history.c index 494c1e00d..4b2876665 100644 --- a/embed/ephy-history.c +++ b/embed/ephy-history.c @@ -29,6 +29,7 @@ #include "ephy-node-common.h" #include "eel-gconf-extensions.h" #include "ephy-prefs.h" +#include "ephy-glib-compat.h" #include #include @@ -38,8 +39,8 @@ #define EPHY_HISTORY_XML_ROOT (const xmlChar *)"ephy_history" #define EPHY_HISTORY_XML_VERSION (const xmlChar *)"1.0" -/* how often to save the history, in milliseconds */ -#define HISTORY_SAVE_INTERVAL (5 * 60 * 1000) +/* how often to save the history, in seconds */ +#define HISTORY_SAVE_INTERVAL (5 * 60) /* if you change this remember to change also the user interface description */ #define HISTORY_PAGE_OBSOLETE_DAYS 10 @@ -606,7 +607,7 @@ ephy_history_init (EphyHistory *eb) /* setup the periodic history saving callback */ eb->priv->autosave_timeout = - g_timeout_add (HISTORY_SAVE_INTERVAL, + g_timeout_add_seconds (HISTORY_SAVE_INTERVAL, (GSourceFunc)periodic_save_cb, eb); -- cgit v1.2.3