diff -b -u -U 10 -r glib-2.2.3/docs/reference/glib/tmpl/timers.sgml glib-2.2.3-patched/docs/reference/glib/tmpl/timers.sgml
--- glib-2.2.3/docs/reference/glib/tmpl/timers.sgml	2003-08-26 17:45:31.000000000 +0100
+++ glib-2.2.3-patched/docs/reference/glib/tmpl/timers.sgml	2003-10-23 21:55:10.000000000 +0100
@@ -45,20 +45,27 @@

 <!-- ##### FUNCTION g_timer_stop ##### -->
 <para>
 Marks an end time, so calls to g_timer_elapsed() will return the difference
 between this end time and the start time.
 </para>

 @timer: a #GTimer.


+<!-- ##### FUNCTION g_timer_continue ##### -->
+<para>
+Resumes a timer that has previously been stopped.
+</para>
+
+@timer: a #GTimer.
+
 <!-- ##### FUNCTION g_timer_elapsed ##### -->
 <para>
 If @timer has been started but not stopped, obtains the time since the timer was
 started. If @timer has been stopped, obtains the elapsed time between the time
 it was started and the time it was stopped. The return value is the number of
 seconds elapsed, including any fractional part. The @microseconds
 out parameter is essentially useless.
 </para>

 @timer: a #GTimer.
diff -b -u -U 10 -r glib-2.2.3/glib/gtimer.c glib-2.2.3-patched/glib/gtimer.c
--- glib-2.2.3/glib/gtimer.c	2002-12-11 23:40:10.000000000 +0000
+++ glib-2.2.3-patched/glib/gtimer.c	2003-10-23 21:04:35.000000000 +0100
@@ -72,57 +72,120 @@
 GTimer*
 g_timer_new (void)
 {
   GTimer *timer;

   timer = g_new (GTimer, 1);
   timer->active = TRUE;
 
   GETTIME (timer->start);
 
+#ifdef G_OS_WIN32
+  timer->end = timer->start;
+#else
+  timer->end.tv_sec = timer->start.tv_sec;
+  timer->end.tv_usec = timer->start.tv_usec;
+#endif
+
   return timer;
 }
 
 void
 g_timer_destroy (GTimer *timer)
 {
   g_return_if_fail (timer != NULL);
 
   g_free (timer);
 }
 
 void
 g_timer_start (GTimer *timer)
 {
   g_return_if_fail (timer != NULL);
 
-  timer->active = TRUE;
+	g_timer_reset(timer);
 
-  GETTIME (timer->start);
+  timer->active = FALSE;
+	g_timer_continue(timer);
 }

 void
 g_timer_stop (GTimer *timer)
 {
   g_return_if_fail (timer != NULL);

   timer->active = FALSE;
 
   GETTIME(timer->end);
 }
 
 void
 g_timer_reset (GTimer *timer)
 {
   g_return_if_fail (timer != NULL);
 
   GETTIME (timer->start);
+
+#ifdef G_OS_WIN32
+  timer->end = timer->start;
+#else
+  timer->end.tv_sec = timer->start.tv_sec;
+  timer->end.tv_usec = timer->start.tv_usec;
+#endif
+}
+
+void
+g_timer_continue (GTimer *timer)
+{
+#ifdef G_OS_WIN32
+	DWORD elapsed;
+#else
+  struct timeval elapsed;
+#endif /* G_OS_WIN32 */
+
+  g_return_if_fail (timer != NULL);
+  g_return_if_fail (timer->active == FALSE); /* should this silently be ignored? */
+
+#ifdef G_OS_WIN32
+  g_return_if_fail (timer->end >= timer->start); /* wrapping not supported */
+
+	elapsed = timer->end - timer->start;
+
+  GETTIME (timer->start);
+
+	timer->start -= elapsed;
+
+#else /* !G_OS_WIN32 */
+
+  if (timer->start.tv_usec > timer->end.tv_usec)
+    {
+      timer->end.tv_usec += G_USEC_PER_SEC;
+      timer->end.tv_sec--;
+    }
+
+  elapsed.tv_usec = timer->end.tv_usec - timer->start.tv_usec;
+  elapsed.tv_sec = timer->end.tv_sec - timer->start.tv_sec;
+
+  GETTIME (timer->start);
+
+	if (timer->start.tv_usec < elapsed.tv_usec)
+	{
+		timer->start.tv_usec += G_USEC_PER_SEC;
+		timer->start.tv_sec--;
+	}
+
+	timer->start.tv_usec -= elapsed.tv_usec;
+	timer->start.tv_sec -= elapsed.tv_sec;
+
+#endif /* !G_OS_WIN32 */
+
+  timer->active = TRUE;
 }
 
 gdouble
 g_timer_elapsed (GTimer *timer,
 		 gulong *microseconds)
 {
   gdouble total;
 #ifndef G_OS_WIN32
   struct timeval elapsed;
 #endif /* G_OS_WIN32 */
diff -b -u -U 10 -r glib-2.2.3/glib/gtimer.h glib-2.2.3-patched/glib/gtimer.h
--- glib-2.2.3/glib/gtimer.h	2002-11-08 18:47:54.000000000 +0000
+++ glib-2.2.3-patched/glib/gtimer.h	2003-10-23 22:03:50.000000000 +0100
@@ -37,20 +37,21 @@
 /* microseconds per second */
 typedef struct _GTimer		GTimer;
 
 #define G_USEC_PER_SEC 1000000
 
 GTimer* g_timer_new	(void);
 void	g_timer_destroy (GTimer	  *timer);
 void	g_timer_start	(GTimer	  *timer);
 void	g_timer_stop	(GTimer	  *timer);
 void	g_timer_reset	(GTimer	  *timer);
+void	g_timer_continue (GTimer	  *timer);
 gdouble g_timer_elapsed (GTimer	  *timer,
 			 gulong	  *microseconds);
 
 void    g_usleep        (gulong    microseconds);
 
 void    g_time_val_add  (GTimeVal *time_, 
                          glong     microseconds);
 
 G_END_DECLS

diff -b -u -U 10 -r glib-2.2.3/tests/testglib.c glib-2.2.3-patched/tests/testglib.c
--- glib-2.2.3/tests/testglib.c	2003-08-19 14:43:57.000000000 +0100
+++ glib-2.2.3-patched/tests/testglib.c	2003-10-23 21:48:00.000000000 +0100
@@ -309,21 +309,21 @@

 int
 main (int   argc,
       char *argv[])
 {
   GList *list, *t;
   GSList *slist, *st;
   GHashTable *hash_table;
   GMemChunk *mem_chunk;
   GStringChunk *string_chunk;
-  GTimer *timer;
+  GTimer *timer, *timer2;
   gint nums[10] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
   gint morenums[10] = { 8, 9, 7, 0, 3, 2, 5, 1, 4, 6};
   gchar *string;

   gchar *mem[10000], *tmp_string = NULL, *tmp_string_2;
   gint i, j;
   GArray *garray;
   GPtrArray *gparray;
   GByteArray *gbarray;
   GString *string1, *string2;
@@ -943,20 +943,70 @@
 
   g_timer_start (timer);
   while (g_timer_elapsed (timer, NULL) < 3)
     ;
 
   g_timer_stop (timer);
   g_timer_destroy (timer);
 
   g_print ("ok\n");
 
+	g_print ("checking g_timer_continue...\n");
+
+  timer2 = g_timer_new ();
+
+	g_print ("\trun for 1 second...\n");
+	timer = g_timer_new();
+	g_usleep(1000000); /* run timer for 1 second */
+	g_timer_stop(timer);
+
+	g_print ("\tstop for 1 second...\n");
+	g_usleep(1000000); /* wait for 1 second */
+	g_print ("\trun for 2 seconds...\n");
+
+	g_timer_continue(timer);
+	g_usleep(2000000); /* run timer for 2 seconds */
+	g_timer_stop(timer);
+
+	g_print ("\tstop for 1.5 seconds...\n");
+	g_usleep(1500000); /* wait for 1.5 seconds */
+	g_print ("\trun for 0.2 seconds...\n");
+
+	g_timer_continue(timer);
+	g_usleep(200000); /* run timer for 0.2 seconds */
+	g_timer_stop(timer);
+
+	g_print ("\tstop for 4 seconds...\n");
+	g_usleep(4000000); /* wait for 4 seconds */
+	g_print ("\trun for 5.8 seconds...\n");
+
+	g_timer_continue(timer);
+	g_usleep(5800000); /* run timer for 5.8 seconds */
+	g_timer_stop(timer);
+
+	g_print ("\t=> total elapsed = %.2f seconds (should be: 9.00 seconds)\n\n", g_timer_elapsed(timer, NULL));
+
+	if (g_timer_elapsed(timer, NULL) > 8.8 && g_timer_elapsed(timer, NULL) < 9.2)
+		g_print ("g_timer_continue ... ok\n\n");
+	else
+		g_print ("g_timer_continue ... ***** FAILED *****\n\n");
+
+	g_timer_stop(timer2);
+
+	if (g_timer_elapsed(timer2, NULL) > (8.8+6.5) && g_timer_elapsed(timer2, NULL) < (9.2+6.5))
+		g_print ("timer2 ... ok\n\n");
+	else
+		g_print ("timer2 ... ***** FAILED *****\n\n");
+
+	g_timer_destroy(timer);
+	g_timer_destroy(timer2);
+
   g_print ("checking g_ascii_strcasecmp...");
   g_assert (g_ascii_strcasecmp ("FroboZZ", "frobozz") == 0);
   g_assert (g_ascii_strcasecmp ("frobozz", "frobozz") == 0);
   g_assert (g_ascii_strcasecmp ("frobozz", "FROBOZZ") == 0);
   g_assert (g_ascii_strcasecmp ("FROBOZZ", "froboz") > 0);
   g_assert (g_ascii_strcasecmp ("", "") == 0);
   g_assert (g_ascii_strcasecmp ("!#%&/()", "!#%&/()") == 0);
   g_assert (g_ascii_strcasecmp ("a", "b") < 0);
   g_assert (g_ascii_strcasecmp ("a", "B") < 0);
   g_assert (g_ascii_strcasecmp ("A", "b") < 0);
