diff options
author | Daniel Drake <dsd@laptop.org> | 2008-12-06 21:29:39 (GMT) |
---|---|---|
committer | Daniel Drake <dsd@laptop.org> | 2008-12-18 19:56:08 (GMT) |
commit | 2937a09ead08858a6bb4176ecafb4c1bf7dff735 (patch) | |
tree | caabd26787e1237146cf1d80149bf12c0aaefe3c /src/sugar/eggdesktopfile.c | |
parent | 96da9d490ef18fa35893314d4d2b6ee75de0767a (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(). (Actually,
I didn't find any that I felt were timing-critical)
Diffstat (limited to 'src/sugar/eggdesktopfile.c')
-rw-r--r-- | src/sugar/eggdesktopfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sugar/eggdesktopfile.c b/src/sugar/eggdesktopfile.c index ad78345..eb28b9d 100644 --- a/src/sugar/eggdesktopfile.c +++ b/src/sugar/eggdesktopfile.c @@ -955,7 +955,7 @@ end_startup_notification (GdkDisplay *display, NULL); } -#define EGG_DESKTOP_FILE_SN_TIMEOUT_LENGTH (30 /* seconds */ * 1000) +#define EGG_DESKTOP_FILE_SN_TIMEOUT_LENGTH 30 /* seconds */ typedef struct { GdkDisplay *display; @@ -985,7 +985,7 @@ set_startup_notification_timeout (GdkDisplay *display, sn_data->display = g_object_ref (display); sn_data->startup_id = g_strdup (startup_id); - g_timeout_add (EGG_DESKTOP_FILE_SN_TIMEOUT_LENGTH, + g_timeout_add_seconds (EGG_DESKTOP_FILE_SN_TIMEOUT_LENGTH, startup_notification_timeout, sn_data); } #endif /* HAVE_GDK_X11_DISPLAY_BROADCAST_STARTUP_MESSAGE */ |