--- applets/clock/clock.org	2006-09-01 09:14:03.000000000 +0200
+++ applets/clock/clock.c	2006-09-01 09:25:00.000000000 +0200
@@ -48,6 +48,7 @@
 #include <string.h>
 #include <time.h>
 #include <langinfo.h>
+#include <sys/time.h>
 
 #include <panel-applet.h>
 #include <panel-applet-gconf.h>
@@ -243,6 +244,7 @@
 {
 	ClockData *cd = data;
 	time_t new_time;
+	int timeouttime;
 
         time (&new_time);
 
@@ -262,7 +264,20 @@
 		update_clock (cd);
 	}
 
-	return TRUE;
+	if (cd->format == CLOCK_FORMAT_INTERNET)
+		timeouttime = INTERNETSECOND;
+	else {
+		struct timeval tv;
+		gettimeofday(&tv, NULL);
+		timeouttime = (1000000 - tv.tv_usec)/1000+1;
+		if (!cd->showseconds)
+			timeouttime += 1000 * (59 - cd->current_time % 60);
+	}
+        cd->timeout = g_timeout_add (timeouttime,
+				     clock_timeout_callback,
+                                     cd);
+
+	return FALSE;
 }
 
 static float
@@ -489,10 +504,13 @@
 	
 	if (cd->format == CLOCK_FORMAT_INTERNET)
 		timeouttime = INTERNETSECOND;
-	else if (cd->showseconds)
-		timeouttime = 1000;
-	else
-		timeouttime = 10000;
+	else {
+		struct timeval tv;
+		gettimeofday(&tv, NULL);
+		timeouttime = (1000000 - tv.tv_usec)/1000+1;
+		if (!cd->showseconds)
+			timeouttime += 1000 * (59 - cd->current_time % 60);
+	}
 	
 	cd->timeout = g_timeout_add (timeouttime,
 	                             clock_timeout_callback,
