From b17be69d72d855ba3c2b1bc3c5ccf1cbdb35d66a Mon Sep 17 00:00:00 2001 From: Steve Dodier-Lazaro Date: Tue, 10 Feb 2015 15:06:30 +0000 Subject: [PATCH] Force clock to refresh every second --- plugins/clock/clock-time.c | 28 +++------------------------- 1 file changed, 3 insertions(+), 25 deletions(-) diff --git a/plugins/clock/clock-time.c b/plugins/clock/clock-time.c index 16b0f89..d51e1c1 100644 --- a/plugins/clock/clock-time.c +++ b/plugins/clock/clock-time.c @@ -369,31 +369,9 @@ clock_time_timeout_set_interval (ClockTimeTimeout *timeout, if (!restart) g_signal_emit (G_OBJECT (timeout->time), clock_time_signals[TIME_CHANGED], 0); - /* get the seconds to the next internal */ - if (interval == CLOCK_INTERVAL_MINUTE) - { - time = clock_time_get_time (timeout->time); - next_interval = 60 - g_date_time_get_second (time); - } - else - { - next_interval = 0; - } - - if (next_interval > 0) - { - /* start the sync timeout */ - timeout->timeout_id = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, next_interval, - clock_time_timeout_sync, - timeout, NULL); - } - else - { - /* directly start running the normal timeout */ - timeout->timeout_id = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, interval, - clock_time_timeout_running, timeout, - clock_time_timeout_destroyed); - } + timeout->timeout_id = g_timeout_add_seconds_full (G_PRIORITY_DEFAULT, 1, + clock_time_timeout_running, timeout, + clock_time_timeout_destroyed); } -- 2.3.0