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)
This commit is contained in:
@@ -203,7 +203,7 @@ start_phase (GsmSession *session)
|
||||
{
|
||||
if (session->phase < GSM_SESSION_PHASE_APPLICATION)
|
||||
{
|
||||
session->timeout = g_timeout_add (GSM_SESSION_PHASE_TIMEOUT * 1000,
|
||||
session->timeout = g_timeout_add_seconds (GSM_SESSION_PHASE_TIMEOUT,
|
||||
phase_timeout, session);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user