GNOME Bugzilla – Bug 656627
Use g_timeout_real_time_add_full()
Last modified: 2011-08-29 15:13:09 UTC
This is more efficient and a better API. Note this effectively reverts: 9f98f3a20b5eec6a1fa13e5a4972eadc2d728acf da2148e09ee162481a0ffbc106a37e81ff7af790
Created attachment 193915 [details] [review] Use g_timeout_real_time_add_full()
Review of attachment 193915 [details] [review]: > Date: Tue, 16 Aug 2011 04:34:35 -0400 Wow, crazy early. Thanks for all the work on this. ::: src/gs-window-x11.c @@ +2236,1 @@ + microseconds = g_date_time_difference (expiry, now); Isn't this always 60 000 000 ? Why go through the gymnastics for a constant value? Also what happens if the clock skews between here and the g_timeout_real_time_add_full call? Maybe this should be a recurring timeout instead? @@ +2245,3 @@ + (GSourceFunc)update_clock_reset_timer, + window, + NULL); Since this is new api, should bump the minimum glib version required in configure. @@ -2445,3 @@ - window->priv->upower_client = up_client_new (); - g_signal_connect (window->priv->upower_client, "notify-resume", - G_CALLBACK (on_upower_resume), window); Now that this is gone, the buildreq should get dropped from configure
Comment on attachment 193915 [details] [review] Use g_timeout_real_time_add_full() (In reply to comment #2) > Review of attachment 193915 [details] [review]: > > > Date: Tue, 16 Aug 2011 04:34:35 -0400 > Wow, crazy early. Thanks for all the work on this. I'm actually on vacation in Croatia now =) Just having fun with this while my girlfriend works some in the morning. > ::: src/gs-window-x11.c > @@ +2236,1 @@ > + microseconds = g_date_time_difference (expiry, now); > > Isn't this always 60 000 000 ? Why go through the gymnastics for a constant > value? Yes, thinko. I have a fixed patch locally for this (and other comments) but I'll just redo it when bug 655129 is updated.