From 2937a09ead08858a6bb4176ecafb4c1bf7dff735 Mon Sep 17 00:00:00 2001 From: Daniel Drake Date: Sat, 06 Dec 2008 21:29:39 +0000 Subject: 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) --- (limited to 'src/sugar/acme-volume-alsa.c') diff --git a/src/sugar/acme-volume-alsa.c b/src/sugar/acme-volume-alsa.c index c1ea5cc..42bbf4e 100644 --- a/src/sugar/acme-volume-alsa.c +++ b/src/sugar/acme-volume-alsa.c @@ -292,7 +292,7 @@ bail: static void acme_volume_alsa_close (AcmeVolumeAlsa *self) { - self->_priv->timer_id = g_timeout_add (4000, + self->_priv->timer_id = g_timeout_add_seconds (4, (GSourceFunc) acme_volume_alsa_close_real, self); } -- cgit v0.9.1